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 <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
  • Loading branch information
bnoordhuis committed May 14, 2016
1 parent 1a0c80a commit f4f6c6e
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

1 comment on commit f4f6c6e

@keltheceo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.