Skip to content

Commit

Permalink
child_process: use /system/bin/sh on android
Browse files Browse the repository at this point in the history
`/bin/sh` does not exist on Android but `/system/bin/sh` does.

PR-URL: #6745
Refs: #6733
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information
bnoordhuis authored and evanlucas committed May 17, 2016
1 parent ccbc78c commit e0240ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand Down

0 comments on commit e0240ab

Please sign in to comment.