Hi Austin, could you try to explain the choice of .execSync() rather than the Node build-in fs.mkdir() to create the '/usr/bin/oc' path ? Sometimes command lines differs from one 0S to an other for the same result... fs.mkdir() will result the same on every plateforms, am I wrong ?
Correct fs would work as well,I don't generally think about Windows these days. childprocess also has an option to for shell which can you can run the command from a windows shell, but you would have to handle the os detection , so fs is a better option.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Austin, could you try to explain the choice of .execSync() rather than the Node build-in fs.mkdir() to create the '/usr/bin/oc' path ? Sometimes command lines differs from one 0S to an other for the same result... fs.mkdir() will result the same on every plateforms, am I wrong ?
Correct fs would work as well,I don't generally think about Windows these days. childprocess also has an option to for shell which can you can run the command from a windows shell, but you would have to handle the os detection , so fs is a better option.