question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adopt vscode.env.shell

See original GitHub issue

This new API was added since terminal.integrated.shell.* now defaults to null. https://github.com/microsoft/vscode/issues/75091

I recommend adopting env.shell and use that when it’s available and remove the default shell detection logic added in https://github.com/microsoft/vscode-python/pull/5886 in a few months and instead fallback to very basic detection (cmd, bash || sh)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Tyriarcommented, Jun 26, 2019

@DonJayamanne remember to include a fallback:

public get shell(): string {
    if ('env' in vscode) {
        // tslint:disable-next-line: no-any
        return (vscode.env as any).shell;
    }

    return isWindows ? 'cmd.exe' : process.env.SHELL;
}
1reaction
Tyriarcommented, Jun 24, 2019

@DonJayamanne please adopt this before it goes stable, basically the only point of the proposed period is for you to report issues with it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Terminal Shell Integration in Visual Studio Code
Visual Studio Code has the ability to integrate with common shells, allowing the terminal to understand more about what's actually happening inside the...
Read more >
Set global $PATH environment variable in VS Code
Configure your shell (bash by default) to have the $PATH you want. · In VS Code, press ⇧⌘P and type install 'code' command...
Read more >
Efficient Way to Activate Conda in VSCode | by Kathryn
This post is going to introduce the head-to-toe process of how to use Conda environment in VSCode. The post would focus on Windows...
Read more >
Configure Visual Studio Code for Go development
In Visual Studio Code, open the folder where you'll create the root directory of your Go application. To open the folder, click the...
Read more >
Mastering VS Code's Terminal
VS Code will try to pick your preferred terminal on Linux and macOS by looking at the $SHELL environment variable, on Windows Powershell...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found