From 77918174fb70a2c2dc79fe76e45e6c1349c8b60e Mon Sep 17 00:00:00 2001 From: Regan Heath Date: Sun, 24 May 2020 00:04:27 +0100 Subject: [PATCH] Added to .gitignore, use full path to rebar3 script --- .gitignore | 1 + rebar3.ps1 | 1 - src/rebar_prv_escriptize.erl | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 rebar3.ps1 diff --git a/.gitignore b/.gitignore index 8d8813e1..27a48284 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ _checkouts .rebar3 rebar3 rebar3.cmd +rebar3.ps1 _build .depsolver_plt *.beam diff --git a/rebar3.ps1 b/rebar3.ps1 deleted file mode 100644 index bb3c7a97..00000000 --- a/rebar3.ps1 +++ /dev/null @@ -1 +0,0 @@ -& escript.exe (Get-Item $PSCommandPath).Basename @args diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl index 858e86b2..9399a5bf 100644 --- a/src/rebar_prv_escriptize.erl +++ b/src/rebar_prv_escriptize.erl @@ -277,7 +277,7 @@ write_windows_scripts(Target, Wrappers) -> write_windows_script(Target, "powershell") -> CmdPath = unicode:characters_to_list(Target) ++ ".ps1", - CmdScript="& escript.exe (Get-Item $PSCommandPath).Basename @args\r\n", + CmdScript="& escript.exe \"$PSScriptRoot\\$((Get-Item $PSCommandPath).Basename)\" @args\r\n", ok = file:write_file(CmdPath, CmdScript); write_windows_script(Target, _) -> CmdPath = unicode:characters_to_list(Target) ++ ".cmd",