Node version (or tell us if you're using electron or some other framework):
v10.15.3
ShellJS version (the most recent version/Github branch you see the bug on):
master (9237f66 on Mar 6)
Operating system:
ElementaryOS 5 Juno (Ubuntu bionic based-
Description of the bug:
Copying a folder with symlinks disabled (cp -RP) , fails because it is trying to be copied as a file.
Example ShellJS command to reproduce the error:
pieter@officepib:~$ cd /tmp
pieter@officepib:/tmp$ mkdir TestFolder
pieter@officepib:/tmp$ touch TestFolder/bla
pieter@officepib:/tmp$ shx cp -P TestFolder TestFolder2
/usr/lib/node_modules/shx/node_modules/shelljs/src/common.js:399
throw e;
^
ShellJSInternalError: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:493:3)
at copyFileSync (/usr/lib/node_modules/shx/node_modules/shelljs/src/cp.js:70:22)
at /usr/lib/node_modules/shx/node_modules/shelljs/src/cp.js:298:7
at Array.forEach (<anonymous>)
at _cp (/usr/lib/node_modules/shx/node_modules/shelljs/src/cp.js:243:11)
at /usr/lib/node_modules/shx/node_modules/shelljs/src/common.js:384:25
at shx (/usr/lib/node_modules/shx/lib/shx.js:139:37)
at run (/usr/lib/node_modules/shx/lib/cli.js:20:31)
at Object.<anonymous> (/usr/lib/node_modules/shx/lib/cli.js:39:3)
at Module._compile (internal/modules/cjs/loader.js:701:30)
On cp.js:250 seems to only go into a directory when following symlinks is enabled.
Node version (or tell us if you're using electron or some other framework):
v10.15.3
ShellJS version (the most recent version/Github branch you see the bug on):
master (9237f66 on Mar 6)
Operating system:
ElementaryOS 5 Juno (Ubuntu bionic based-
Description of the bug:
Copying a folder with symlinks disabled (cp -RP) , fails because it is trying to be copied as a file.
Example ShellJS command to reproduce the error:
On cp.js:250 seems to only go into a directory when following symlinks is enabled.