Преглед изворни кода

Merge pull request #1500 from ferd/fix-win-tests

Path-type sensitive .cmd creation
pull/1502/head
Fred Hebert пре 8 година
committed by GitHub
родитељ
комит
9e8256ba73
1 измењених фајлова са 4 додато и 1 уклоњено
  1. +4
    -1
      src/rebar_prv_escriptize.erl

+ 4
- 1
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).

Loading…
Откажи
Сачувај