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 <cjihrig@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent ccbc78c commit e0240ab

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎lib/child_process.js‎

Lines changed: 6 additions & 1 deletion
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=typeofoptions.shell==='string' ? options.shell : '/bin/sh';
335+
if(typeofoptions.shell==='string')
336+
file=options.shell;
337+
elseif(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)