fix: only call removeDirAll if path exists
This commit is contained in:
parent
3abf53d196
commit
628e5e2818
1 changed files with 3 additions and 2 deletions
|
|
@ -20,8 +20,9 @@ def Package.run (script : String) (args : List String) (self : Package) : IO PUn
|
|||
else
|
||||
self.scripts.forM fun name _ => IO.println name
|
||||
|
||||
def Package.clean (self : Package) : IO PUnit :=
|
||||
IO.FS.removeDirAll self.buildDir
|
||||
def Package.clean (self : Package) : IO PUnit := do
|
||||
if (← self.buildDir.pathExists) then
|
||||
IO.FS.removeDirAll self.buildDir
|
||||
|
||||
-- # CLI
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue