Skip to content

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

Closed

Description

@jimmyff

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?

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in editorRelates to code editing or language features
    on Mar 27, 2018
  2. DanTup commented on Mar 27, 2018

    @DanTup
    Member

    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.

  3. added this to the Backlog milestone on Mar 27, 2018
  4. modified the milestones: Backlog, On Deck on Jun 1, 2020
  5. modified the milestones: On Deck, Backlog on Jul 2, 2020
  6. DanTup commented on Nov 12, 2020

    @DanTup
    Member

    Currently blocked on microsoft/vscode#99878.

  7. changed the title [-]Switching SDK version reflected in terminal[/-] [+]Switching SDK version should be reflected in terminal[/+] on Nov 18, 2020
  8. added a commit that references this issue on Jan 16, 2023
    e977be8
  9. modified the milestones: Backlog, v3.60.0 on Jan 16, 2023
  10. DanTup commented on Jan 16, 2023

    @DanTup
    Member

    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.

  11. added a commit that references this issue on Feb 20, 2023
    486bdf6
  12. changed the title [-]Switching SDK version should be reflected in terminal[/-] [+]Switching SDK version should be reflected in terminal ("dart.addSdkToTerminalPath" setting)[/+] on Feb 20, 2023
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

    in editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions