diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rebar_prv_escriptize.erl | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl index 5c0c989..56b0d8a 100644 --- a/src/rebar_prv_escriptize.erl +++ b/src/rebar_prv_escriptize.erl @@ -266,9 +266,12 @@ rm_newline(String) ->      [C || C <- String, C =/= $\n].  write_windows_script(Target) -> +    CmdPath = if is_binary(Target) -> <<Target/binary, ".cmd">>; +                 is_list(Target) -> Target ++ ".cmd" +              end,      CmdScript=          "@echo off\r\n"          "setlocal\r\n"          "set rebarscript=%~f0\r\n"          "escript.exe \"%rebarscript:.cmd=%\" %*\r\n", -    ok = file:write_file(Target ++ ".cmd", CmdScript). +    ok = file:write_file(CmdPath, CmdScript). | 
