From b0dc9ad8d3e96d8882e0edb3e94cc6c4b553afd3 Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Tue, 23 Jun 2015 14:28:16 +0200 Subject: Fix paths for symlinks --- rebar3 | Bin 363107 -> 358693 bytes rebar3.cmd | 4 ++++ src/rlx_util.erl | 4 +++- test/rlx_command_SUITE.erl | 4 +--- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 rebar3.cmd diff --git a/rebar3 b/rebar3 index 404d9a5..4b9a893 100755 Binary files a/rebar3 and b/rebar3 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)), -- cgit v1.2.3