From 58a40f156b3b9d615e8e0e3e713416945ed8eeef Mon Sep 17 00:00:00 2001 From: Regan Heath Date: Sat, 18 Apr 2020 23:04:11 +0100 Subject: [PATCH] Simplify windows script --- src/rebar_prv_escriptize.erl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl index d6d94144..d61e29d9 100644 --- a/src/rebar_prv_escriptize.erl +++ b/src/rebar_prv_escriptize.erl @@ -276,7 +276,5 @@ write_windows_script(Target) -> CmdPath = unicode:characters_to_list(Target) ++ ".cmd", CmdScript= "@echo off\r\n" - "setlocal\r\n" - "set rebarscript=%~f0\r\n" - "escript.exe \"%rebarscript:.cmd=%\" %*\r\n", + "escript.exe \"%~dpn0\" %*\r\n", ok = file:write_file(CmdPath, CmdScript).