Closed
Labels
Description
Not all Linuxes have bash, but practically all of them have sh. From what I can see, there are no features from bash that are not in sh being used. Would it be possible to change the attachToProcess.js from
const command = `bash -c 'uname && if [ $(uname) == "Linux" ] ; then ${nativeAttach_1.PsProcessParser.psLinuxCommand} ; elif [ $(uname) == "Darwin" ] ; ` +
`then ${nativeAttach_1.PsProcessParser.psDarwinCommand}; fi'`;to
const command = `sh -c 'uname && if [ $(uname) == "Linux" ] ; then ${nativeAttach_1.PsProcessParser.psLinuxCommand} ; elif [ $(uname) == "Darwin" ] ; ` +
`then ${nativeAttach_1.PsProcessParser.psDarwinCommand}; fi'`;This comes up more often when using the pipeTransport to debug on other operating systems.
Reacted by Alex Korotkin
Activity
alex-che commentedon Jul 30, 2018
Stumbled upon the same problem when trying to set up vscode remote debugging with an embedded Linux device. Ended up making the same changes in
attachToProcess.jsand it helped. Seems like using 'bash' does not give anything useful here, but sacrifice cross-platformability.Using sh instead of bash
Using sh instead of bash (#2340)