-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Closed
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.
Description
Hey, i have a bash alias on my ubuntu server
myalias="some unix command here"When running node:
child_process.exec('myalias', {shell: '/bin/bash'},
function (error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
});Result with the following error:
exec error: Error: Command failed: /bin/bash -c myalias
How can i workaround to run alias or bash function in order to shortcut a long command line.
Thanks in advance!
Metadata
Metadata
Assignees
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.