Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching SDK version should be reflected in terminal ("dart.addSdkToTerminalPath" setting) #737

Closed
jimmyff opened this issue Mar 27, 2018 · 3 comments
Labels
in editor Relates to code editing or language features is enhancement
Milestone

Comments

@jimmyff
Copy link

jimmyff commented Mar 27, 2018

When I switch my SDK version using the status bar and then I open a terminal I don't see the new version when I run dart --version.

This could maybe be set in to the path when a new terminal is created?

@DanTup DanTup added is enhancement in editor Relates to code editing or language features labels Mar 27, 2018
@DanTup
Copy link
Member

DanTup commented Mar 27, 2018

Seems like we don't have any control over the terminal creation, so I think the best we can probably do is to read from the terminals env settings.

Some info here:

microsoft/vscode#34337

So the user would set something like:

{
  "terminal.integrated.env.windows": {
    "PATH": "${env:PATH};C:\bin"
  }
}

Ugh, except I tried it and we just get that literal string, not the resolved value. We could parse it manually but it's getting hacky.

I've opened microsoft/vscode#46696 to see if they can suggest a better way.

@DanTup DanTup added the blocked on vs code / lsp / dap Requires a change in VS Code to progress label Mar 27, 2018
@DanTup DanTup added this to the Backlog milestone Mar 27, 2018
@DanTup DanTup modified the milestones: Backlog, On Deck Jun 1, 2020
@DanTup DanTup modified the milestones: On Deck, Backlog Jul 2, 2020
@DanTup
Copy link
Member

DanTup commented Nov 12, 2020

Currently blocked on microsoft/vscode#99878.

@DanTup DanTup changed the title Switching SDK version reflected in terminal Switching SDK version should be reflected in terminal Nov 18, 2020
DanTup added a commit that referenced this issue Jan 16, 2023
@DanTup DanTup removed the blocked on vs code / lsp / dap Requires a change in VS Code to progress label Jan 16, 2023
@DanTup DanTup modified the milestones: Backlog, v3.60.0 Jan 16, 2023
@DanTup
Copy link
Member

DanTup commented Jan 16, 2023

The VS Code issue has been resolved for macOS, so we should be able to do this after the next stable VS Code release.

WIP is at https://github.com/Dart-Code/Dart-Code/tree/add-sdk-path-to-env-path, but there needs to be a setting to opt-out.

@DanTup DanTup changed the title Switching SDK version should be reflected in terminal Switching SDK version should be reflected in terminal ("dart.addSdkToTerminalPath" setting) Feb 20, 2023
@DanTup DanTup closed this as completed in 486bdf6 Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features is enhancement
Projects
None yet
Development

No branches or pull requests

2 participants