Skip to content

CLI on Windows: --folder-uri option only works as the last argument and when the --wait option is not present #209072

Closed

Description

@kiwi-bui

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.87.2
  • OS Version: Windows 10 Pro 19044.2486 VM

Steps to Reproduce:

  1. Case where --folder-uri is not the last option. Run code --folder-uri vscode-remote://ssh-remote+vscode@some-workspace --disable-extension ms-vscode-remote.remote-containers --new-window --wait. Command will return immediately without action or error.
  2. Case where --folder-uri is the last option but --wait is present. Run code --disable-extension ms-vscode-remote.remote-containers --new-window --wait --folder-uri vscode-remote://ssh-remote+vscode@some-workspace. Command will return immediately without action or error.

There seems to be a behavior where the the code command silently errors when --folder-uri and the --wait options are used together. Also, there seems to be a bug where the the code command silently errors when the --folder-uri option is not the last option.

Activity

  1. connor4312 commented on Mar 29, 2024

    @connor4312
    Member

    This seems like an electron bug(?)

    Passing code --any-arg with-a-colon: --verbose fails (exits immediately without calling main.js) but removing the colon works code --any-arg without-a-colon --verbose. Same when calling the exe directly versus going through a batch script.

  2. deepak1556 commented on Apr 2, 2024

    @deepak1556
    Collaborator

    Yeah the uri argument handling is not a bug but a security fix in the runtime, we also hit this in another feature of vscode for context: #188769 (comment)

    Would it be possible to encode the uri for the argument ?

  3. kiwi-bui commented on Apr 5, 2024

    @kiwi-bui
    Author

    Is this also related to the --wait option not being able to be used with the --folder-uri option?

  4. added
    good first issue
    windows
    on Dec 17, 2024
  5. 4 remaining items

  6. jaleelw7 commented on Feb 11, 2026

    @jaleelw7

    Hello Robo (@deepak1556). Has this issue already been resolved? If not, I'd like to work on it as a first contribution.

  7. zhanglinqian commented on Feb 12, 2026

    @zhanglinqian

    I'd like to work on this issue.

  8. omwanere commented on Mar 17, 2026

    @omwanere

    Hi maintainers, I’m interested in working on this issue and contributing a fix for the CLI behavior with --folder-uri on Windows.
    If the issue is still open, could you please assign it to me?

  9. even0120021 commented on Mar 27, 2026

    @even0120021

    Hi, I noticed this issue is already assigned, but I'm a student learning open source contribution and would love to try fixing this CLI parameter bug for practice. Could I follow along and submit a PR for learning purposes?

  10. added a commit that references this issue on Apr 7, 2026
    c39f1dd
  11. added this to the 1.123.0 milestone on May 28, 2026
  12. added a commit that references this issue on May 28, 2026
    3cb23da
  13. added
    unreleased
    insiders-released
    and removed
    unreleased
    on May 28, 2026
  14. locked and limited conversation to collaborators on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buggood first issueinsiders-releasedteam-low-hangingverifiedwindowsworkbench-cli

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions