From c45bad94376b81ac89356d59b0ff7234e2893c27 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 25 Aug 2019 17:16:44 -0400 Subject: [PATCH] Better shim for scripts on windows. Arguments should be passed in properly. --- auxlib/cook.janet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auxlib/cook.janet b/auxlib/cook.janet index 84ba47f4..392fb27d 100644 --- a/auxlib/cook.janet +++ b/auxlib/cook.janet @@ -689,7 +689,8 @@ int main(int argc, const char **argv) { # Create a dud batch file when on windows. (when is-win (def name (last (string/split sep main))) - (def bat (string "@echo off\r\njanet %~dp0\\" name "%*")) + (def fullname (string binpath sep name)) + (def bat (string "@echo off\r\njanet " fullname " %*")) (def newname (string binpath sep name ".bat")) (array/push (dyn :installed-files) newname) (add-body "install"