diff --git a/CHANGELOG.md b/CHANGELOG.md index b2836855..e3a94f75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. ## Unreleased - Add `buffer/format` and `string/format` format flags `Q` and `q` to print colored and - non-colored single-line values. + non-colored single-line values, similar ti `P` and `p`. - Change default repl to print long sequences on one line. - Add `backmatch` pattern for PEGs. - jpm detects if not in a Developer Command prompt on windows for a better error message. diff --git a/auxlib/cook.janet b/auxlib/cook.janet index 94064df6..2b08224b 100644 --- a/auxlib/cook.janet +++ b/auxlib/cook.janet @@ -689,12 +689,12 @@ 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" - (spit newname bat)) - (add-body "uninstall" - (os/rm newname)))) + (spit newname bat)))) (defn declare-archive "Build a janet archive. This is a file that bundles together many janet