Skip to content

Support adding SDKs to PATH on macOS (command + as part of Flutter install) #4612

Closed

Description

@DanTup

Currently the work done for #4604 is Windows-only.

We need to evaluate options for adding to PATH on macOS. The original plan was to add symlinks to something like /usr/bin, however since the SDK is likely in a user-specific folder, this could do bad things for systems used by more than one user.

We should see if there's a reasonable way we could automate adding to shell profile scripts (is it save to always append? can we tell which profile script(s) are required?).

@polina-c

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in commandsRelates to commands (usually invoked from the command Palette)
    on Jun 26, 2023
  2. modified the milestones: v3.68.0, v3.70.0 on Jun 26, 2023
  3. modified the milestones: v3.70.0, v3.72.0 on Jul 25, 2023
  4. modified the milestones: v3.72.0, v3.74.0 on Aug 29, 2023
  5. modified the milestones: v3.74.0, v3.76.0 on Sep 26, 2023
  6. modified the milestones: v3.76.0, v3.78.0 on Oct 30, 2023
  7. removed this from the v3.78.0 milestone on Nov 29, 2023
  8. 12 remaining items

  9. modified the milestones: v3.120.0, v3.118.2 on Sep 18, 2025
  10. changed the title [-]Support automatically adding to PATH on macOS[/-] [+]Support adding SDKs to PATH on macOS (command + as part of Flutter install)[/+] on Sep 18, 2025
  11. DanTup commented on Sep 18, 2025

    @DanTup
    MemberAuthor

    @sethladd @anderdobo I've published a pre-release of the extension today that includes this work (as well as another bug I found while testing - #5709). To test it, ensure you're on the pre-release and that you have v3.119.20250918 (and have restarted the extensions after updating).

    Dart pre-release versions

    Assuming it works as you'd like, let me know if the pre-release is good enough for your use, or if you think we should cherry-pick this into a stable release (I could do this tomorrow).

    Note: This change was macOS-only, however it occurs to me that the changes as-is would probably work for Linux too (for those two shells that we support),. I've opened #5711 for this, which I'll just include in the next stable release unless it's important to you to also include now in a pre-release or a stable patch.

  12. sethladd commented on Sep 18, 2025

    @sethladd

    Thanks so much for the quick turnaround! I'll test now.

  13. sethladd commented on Sep 18, 2025

    @sethladd

    Seemed to work great, thank you!! Tested on a Mac with VS Code

    Image Image

    And it put the following into my ~/.bash_profile: export PATH="/Users/sethladd/flutter/bin:$PATH"

  14. sethladd commented on Sep 18, 2025

    @sethladd

    you think we should cherry-pick this into a stable release (I could do this tomorrow).

    I personally would like a new stable release, as it simplifies things for us. However, I defer to you and Ander to assess the risk. If this is the only change , then I think the risk is low and you should make a new stable release.

  15. sethladd commented on Sep 18, 2025

    @sethladd

    I will note that this shouldn't be necessary if you're using the built-in shell inside VS Code though - we already automatically add to PATH for built-in terminals, this functionality is only for external terminals outside of VS Code.

    Ack

    I've opened #5711 for this, which I'll just include in the next stable release unless it's important to you to also include now in a pre-release or a stable patch.

    Personally, we don't need #5711 to be included in a stable path release.

  16. DanTup commented on Sep 18, 2025

    @DanTup
    MemberAuthor

    @sethladd thanks for testing! I'll push a stable build with this tomorrow (it will be just this and #5709 cherry-picked, both of which are low risk IMO).

  17. sethladd commented on Sep 18, 2025

    @sethladd

    Sounds awesome, thanks!

  18. DanTup commented on Sep 19, 2025

    @DanTup
    MemberAuthor

    @sethladd this has been published in the stable v3.118.2 of the Dart extension, so the fix is now live to both stable and pre-release users. Users will need to let the extension update and then click the "Restart Extensions" button or restart VS Code after installing.

  19. sethladd commented on Sep 21, 2025

    @sethladd

    Thank you so much!

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 commandsRelates to commands (usually invoked from the command Palette)is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.on mac

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions