Skip to content

Commit e0240ab

Browse files
bnoordhuisevanlucas
authored andcommitted
child_process: use /system/bin/sh on android
`/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]>
1 parent ccbc78c commit e0240ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/child_process.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,12 @@ function normalizeSpawnArguments(file /*, args, options*/) {
332332
args = ['/s', '/c', '"' + command + '"'];
333333
options.windowsVerbatimArguments = true;
334334
} else {
335-
file = typeof options.shell === 'string' ? options.shell : '/bin/sh';
335+
if (typeof options.shell === 'string')
336+
file = options.shell;
337+
else if (process.platform === 'android')
338+
file = '/system/bin/sh';
339+
else
340+
file = '/bin/sh';
336341
args = ['-c', command];
337342
}
338343
}

0 commit comments

Comments
 (0)