Browse Source

child_process: use /system/bin/sh on android

`/bin/sh` does not exist on Android but `/system/bin/sh` does.

PR-URL: https://github.com/nodejs/node/pull/6745
Refs: https://github.com/nodejs/node/pull/6733
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
process-exit-stdio-flushing
Ben Noordhuis 9 years ago
parent
commit
f4f6c6e815
  1. 7
      lib/child_process.js

7
lib/child_process.js

@ -332,7 +332,12 @@ function normalizeSpawnArguments(file /*, args, options*/) {
args = ['/s', '/c', '"' + command + '"'];
options.windowsVerbatimArguments = true;
} else {
file = typeof options.shell === 'string' ? options.shell : '/bin/sh';
if (typeof options.shell === 'string')
file = options.shell;
else if (process.platform === 'android')
file = '/system/bin/sh';
else
file = '/bin/sh';
args = ['-c', command];
}
}

Loading…
Cancel
Save