You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node version (or tell us if you're using electron or some other framework): v6.8.0
ShellJS version (the most recent version/Github branch you see the bug on): 0.7.5
Operating system: Mac
Description of the bug: Shell js exits with Error: EEXIST: file already exists when mkdir path is not normalized. You cannot trap this with a try/catch block.
Expected result is that no error should be thrown and certainly the process should not terminate. '-p' flag should not fail for any existing path or part of path.
The text was updated successfully, but these errors were encountered:
@webOS101 Thanks for reporting. It looks like most of our utilities should probably normalize paths before using them. I'll work on a fix for this tonight using path.resolve().
It looks to me like most commands would want paths to be resolved before handling them (ln() is an example of where this is not the case). I'll wrap this functionality as a default part of common.wrap (ln() will opt-out), although this probably only affects mkdir -p, cp -r, and rm -r, and ls -R (anything recursive).
To address your second concern, where the process dies, this will be fixed when we release v0.8. See #483.
Adds tests to make sure that non-normalized paths (i.e. path/to/./dir) are
valid for a few commands, including mkdir() which previously failed when given
the -p flag.
Fixes#634
Adds tests to make sure that non-normalized paths (i.e. path/to/./dir) are
valid for a few commands, including mkdir() which previously failed when given
the -p flag.
Fixes#634
Node version (or tell us if you're using electron or some other framework): v6.8.0
ShellJS version (the most recent version/Github branch you see the bug on): 0.7.5
Operating system: Mac
Description of the bug: Shell js exits with
Error: EEXIST: file already exists
when mkdir path is not normalized. You cannot trap this with atry
/catch
block.Example ShellJS command to reproduce the error:
Expected result is that no error should be thrown and certainly the process should not terminate.
'-p'
flag should not fail for any existing path or part of path.The text was updated successfully, but these errors were encountered: