aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-06-25 21:01:49 -0500
committerTristan Sloughter <[email protected]>2015-06-25 21:01:49 -0500
commitde9a40aa699d26e1651e11c6776f2f6b1c9c1c1f (patch)
tree8ce6f09d2da459335d55047d5ac54d23f9bb8f8c
parent3b2c57acb963ffb2d5fd128927851c953a558f9b (diff)
parentb0dc9ad8d3e96d8882e0edb3e94cc6c4b553afd3 (diff)
downloadrelx-de9a40aa699d26e1651e11c6776f2f6b1c9c1c1f.tar.gz
relx-de9a40aa699d26e1651e11c6776f2f6b1c9c1c1f.tar.bz2
relx-de9a40aa699d26e1651e11c6776f2f6b1c9c1c1f.zip
Merge pull request #356 from Taure/fix-windows-symlink
Fix paths for symlinks
-rwxr-xr-xrebar3bin363107 -> 358693 bytes
-rw-r--r--rebar3.cmd4
-rw-r--r--src/rlx_util.erl4
-rw-r--r--test/rlx_command_SUITE.erl4
4 files changed, 8 insertions, 4 deletions
diff --git a/rebar3 b/rebar3
index 404d9a5..4b9a893 100755
--- a/rebar3
+++ b/rebar3
Binary files differ
diff --git a/rebar3.cmd b/rebar3.cmd
new file mode 100644
index 0000000..6c7a1ca
--- /dev/null
+++ b/rebar3.cmd
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+set rebarscript=%~f0
+escript.exe "%rebarscript:.cmd=%" %*
diff --git a/src/rlx_util.erl b/src/rlx_util.erl
index f732055..775d78d 100644
--- a/src/rlx_util.erl
+++ b/src/rlx_util.erl
@@ -222,7 +222,9 @@ symlink_or_copy(Source, Target) ->
{error, _} ->
case os:type() of
{win32, _} ->
- win32_symlink(Source, Target);
+ S = unicode:characters_to_list(Source),
+ T = unicode:characters_to_list(Target),
+ win32_symlink(filename:nativename(S), filename:nativename(T));
_ ->
case filelib:is_dir(Target) of
true -> ok;
diff --git a/test/rlx_command_SUITE.erl b/test/rlx_command_SUITE.erl
index 9d1513f..32efc1e 100644
--- a/test/rlx_command_SUITE.erl
+++ b/test/rlx_command_SUITE.erl
@@ -62,9 +62,7 @@ normal_passing_case(Config) ->
{ok, {Opts, Targets}} = getopt:parse(relx:opt_spec_list(), CmdLine),
{ok, State} = rlx_cmd_args:args2state(Opts, Targets),
{ok, State1} = rlx_config:do(State),
- Overrides = rlx_state:overrides(State1),
- ct:pal("Overrides: ~p~n", [Overrides]),
- ?assertMatch([{lib1,Lib1}], Overrides),
+ ?assertMatch([{lib1,Lib1}], rlx_state:overrides(State1)),
?assertMatch([Lib1, Lib2],
rlx_state:lib_dirs(State1)),
?assertMatch(Outdir, rlx_state:base_output_dir(State1)),