diff --git a/bundle/init.janet b/bundle/init.janet index cc63405..77a039c 100644 --- a/bundle/init.janet +++ b/bundle/init.janet @@ -4,7 +4,7 @@ (defn install [m &] (bundle/add-file m "src/tarray.h" "tarray.h") (bundle/add m "spork") - (when (dyn 'bundle/add-bin) + (compwhen (dyn 'bundle/add-bin) (bundle/add-bin m "bin/janet-format") (bundle/add-bin m "bin/janet-netrepl")) (each file (os/dir "build") diff --git a/spork/cc.janet b/spork/cc.janet index 2b600b2..f224273 100644 --- a/spork/cc.janet +++ b/spork/cc.janet @@ -340,10 +340,11 @@ (set found-path path) (break))) (unless found-path (error "Could not find vcvarsall.bat")) - (def arg (string `"` found-path `" ` arch ` && echo ` tag ` && set`)) + (when (dyn :verbose) + (print "found " found-path)) + (def arg (string (string/replace-all " " "^ " found-path) ` ` arch ` && echo ` tag ` && set`)) (def output (sh/exec-slurp "cmd" "/s" "/c" arg)) - (def parsed-block (last (string/split tag output))) - (def kvpairs (peg/match vcvars-grammar parsed-block)) + (def kvpairs (peg/match vcvars-grammar output)) (assert kvpairs) (each [k v] kvpairs (os/setenv (string/trim k) (string/trim v)))