Skip to content

getRemoteOSAndProcesses uses bash #569

Closed

Description

@andyneff

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.

Activity

  1. alex-che commented on Jul 30, 2018

    @alex-che

    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.js and it helped. Seems like using 'bash' does not give anything useful here, but sacrifice cross-platformability.

  2. added a commit that references this issue on Jul 30, 2018
    8adb0bd
  3. added a commit that references this issue on Jul 30, 2018
    c36eb8e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions