-
Notifications
You must be signed in to change notification settings - Fork 2.1k
rm command does not throw when removing file in use #14900
Copy link
Copy link
Closed
Labels
A:error-handlingHow errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)How errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)A:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemcategory:bugSomething isn't workingSomething isn't working
Metadata
Metadata
Assignees
Labels
A:error-handlingHow errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)How errors in externals/nu code are caught or handled programmatically (see also unhelpful-error)A:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemcategory:bugSomething isn't workingSomething isn't working
Describe the bug
When wrapping
rmin atry/catchblock, sometimes it does strange things. If the file is in use when deleted on Windows, the try following snippet would print "success" instead of "fail".How to reproduce
Output:
(note that the error is printed followed by "success")
Expected behavior
Expected
rmto throw an error and invoke thecatchblock, printing "fail" instead.Configuration