File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 185
185
(defn clear-cache
186
186
[]
187
187
(def cache (path/join (dyn *syspath* ) " .cache" ))
188
- (sh/rm cache ))
188
+ (sh/rm-readonly cache ))
189
189
190
190
(defn list-pkgs
191
191
[&opt search ]
Original file line number Diff line number Diff line change 721
721
(spit (path/join path " bin" " activate.bat" ) (enter-cmd-template opts ))
722
722
(spit (path/join path " bin" " deactivate.bat" ) (exit-cmd-template opts ))
723
723
(print " created project shell environment at " path )
724
- (if ( or ( = :windows ( os/which )) ( = :mingw ( os/which )) )
725
- (print " run `" path " \\ bin\\ activate` to enter the new environment, then `deactivate` to exit." )
726
- (print " run `. " path " /bin/activate` to enter the new environment, then `deactivate` to exit." ) ))
724
+ (print " (PowerShell) run `. " path " /bin/activate.ps1` to enter the new environment, then `deactivate` to exit. " )
725
+ (print " (CMD) run `" path " \\ bin\\ activate` to enter the new environment, then `deactivate` to exit." )
726
+ (print " (Unix sh) run `. " path " /bin/activate` to enter the new environment, then `deactivate` to exit." ))
Original file line number Diff line number Diff line change 68
68
# Default, try to remove
69
69
(os/rm path )))
70
70
71
+ (defn rm-readonly
72
+ " Like sh/rm, but will also remove readonly files and folders on windows"
73
+ [path ]
74
+ (def os (os/which ))
75
+ (when (or (= os :windows ) (= os :mingw ))
76
+ (def root
77
+ (if (= :file (os/stat path :mode ))
78
+ path
79
+ (path/join path " *.*" )))
80
+ (exec " attrib" " -R" " -H" root " /S" " /D" ))
81
+ (rm path ))
82
+
71
83
(defn exists?
72
84
" Check if the given file or directory exists. (Follows symlinks)"
73
85
[path ]
You can’t perform that action at this time.
0 commit comments