Skip to content

Is it possible to run WSL shell as the FileName? #40

Description

@solvingj

Installed product versions

  • Visual Studio: 2017
  • This extension: 1.1.41

Description

I've tried several variations to run the Windows Subsystem for Linux shells from CommandTaskRunner and have been unsuccessful. All variations so far either crash visual studio, say 'wsl' is not recognized as an internal or external command..., or produce an error dialog.

Steps to recreate

Try any of the following as the FileName+Argument pairs in a new command in commands.json.

wsl
wsl.exe
cmd /C wsl
cmd /C C:\windows\System32\wsl.exe
cmd /C C:\windows\System32\bash.exe

If any of these produced a bash shell, or executed a .sh script inside that bash shell, it would be sufficient. Most of them work just fine if I run them from command prompt, but something about the way it's implemented in TaskRunnerExplorer makes them all fail. Perhaps someone who understands TaskRunnerExplorer internals might be able to imagine a working incantation.

Of note, some tutorials I've seen for VSCode say things like this:
add this rule to your User Settings:
"terminal.integrated.shell.windows": "C:\WINDOWS\sysnative\bash.exe"

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions