1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-28 08:03:16 +00:00

More windows shenanigans with jpm.

Cannot remove open file, get rid of double rm.
This commit is contained in:
Calvin Rose 2020-05-19 20:03:49 -04:00
parent 1026d2173b
commit 617338457d
2 changed files with 5 additions and 5 deletions

7
jpm
View File

@ -78,8 +78,8 @@
[path] [path]
(if is-win (if is-win
# windows get rid of read-only files # windows get rid of read-only files
(os/shell (string `rmdir /S /Q "` path `"`))) (os/shell (string `rmdir /S /Q "` path `"`))
(rm path)) (rm path)))
(defn clear-cache (defn clear-cache
"Clear the global git cache." "Clear the global git cache."
@ -674,7 +674,8 @@ int main(int argc, const char **argv) {
(each path (get man :paths []) (each path (get man :paths [])
(print "removing " path) (print "removing " path)
(rm path)) (rm path))
(print "removing " manifest) (print "removing manifest " manifest)
(:close f) # I hate windows
(rm manifest) (rm manifest)
(print "Uninstalled."))) (print "Uninstalled.")))

View File

@ -23,7 +23,6 @@
# Using a large test grammar # Using a large test grammar
(def- core-env (table/getproto (fiber/getenv (fiber/current))))
(def- specials {'fn true (def- specials {'fn true
'var true 'var true
'do true 'do true
@ -41,7 +40,7 @@
(defn capture-sym (defn capture-sym
[text] [text]
(def sym (symbol text)) (def sym (symbol text))
[(if (or (core-env sym) (specials sym)) :coresym :symbol) text]) [(if (or (root-env sym) (specials sym)) :coresym :symbol) text])
(def grammar (def grammar
~{:ws (set " \v\t\r\f\n\0") ~{:ws (set " \v\t\r\f\n\0")