1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-25 06:33: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]
(if is-win
# windows get rid of read-only files
(os/shell (string `rmdir /S /Q "` path `"`)))
(rm path))
(os/shell (string `rmdir /S /Q "` path `"`))
(rm path)))
(defn clear-cache
"Clear the global git cache."
@ -674,7 +674,8 @@ int main(int argc, const char **argv) {
(each path (get man :paths [])
(print "removing " path)
(rm path))
(print "removing " manifest)
(print "removing manifest " manifest)
(:close f) # I hate windows
(rm manifest)
(print "Uninstalled.")))

View File

@ -23,7 +23,6 @@
# Using a large test grammar
(def- core-env (table/getproto (fiber/getenv (fiber/current))))
(def- specials {'fn true
'var true
'do true
@ -41,7 +40,7 @@
(defn capture-sym
[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
~{:ws (set " \v\t\r\f\n\0")