Closed vesse closed 10 years ago
Having same issue when trying to execute:
ln "/home/matyas/work/liebherr/expo/dev/.uploads/dot/hSKwhXZNCjR8MsEj8" "/home/matyas/work/liebherr/expo/dev/.uploads/dot/xJvR74MgeCFLrEXuD"
The error:
Error: ENOENT, no such file or directory '/tmp/tmp1390554848866407920243467669934.stdout'
The paths are valid and command runs fine if executed manually or via childProcess.spawn
exec-sync@0.1.6
I advice you use this module instead: https://github.com/mgutz/execSync I don't maintain my exec-sync repository anymore as the one above is already providing the same features (and even a bit more).
Just a note for those with the same problem: https://github.com/mgutz/execSync seems to solve this issue as mentioned by @jeremyfa
If the command cannot be executed, execSync will fail when it tries to open the
/tmp/id.stdout
file which does not exist. For example,var data = execSync("ls unescapedfilename(123).xml", true);
will fail:I would suggest to check for existence of the files if return value of
libc.system(cmd);
is non-zero, and if the files do not exist, i.e. the command was not executed, report that as an error.