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

CLI on Mac doesn't seem to work #130925

Closed
rzhao271 opened this issue Aug 16, 2021 · 5 comments
Closed

CLI on Mac doesn't seem to work #130925

rzhao271 opened this issue Aug 16, 2021 · 5 comments
Assignees
Labels
info-needed Issue requires more information from poster macos Issues with VS Code on MAC/OS X workbench-cli VS Code Command line issues
Milestone

Comments

@rzhao271
Copy link
Contributor

rzhao271 commented Aug 16, 2021

Ref #102975

  1. Run code-insiders dirname where dirname is the name of a directory.
  2. 🐛 Insiders may or may not open dirname.
  3. In a separate terminal, run code-insiders dirname2 where dirname2 is the name of another directory.
  4. 🐛 Insiders doesn't open that directory.

Replacing the commands with calls to open doesn't work.

@rzhao271 rzhao271 added bug Issue identified by VS Code Team member as probable bug macos Issues with VS Code on MAC/OS X workbench-cli VS Code Command line issues labels Aug 16, 2021
@rzhao271 rzhao271 added this to the August 2021 milestone Aug 16, 2021
@deepak1556 deepak1556 removed their assignment Aug 16, 2021
@deepak1556
Copy link
Collaborator

Unable to repro with latest insiders.

Screen Recording.zip

@deepak1556 deepak1556 added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Aug 16, 2021
@rzhao271
Copy link
Contributor Author

The issue above in my case seems to be caused by having VSCODE_DEV=1 in the env. I'll check the options parameter again and see if I can make it so that during the open command, VSCODE_DEV gets reset. That would help me test using the open command by running the following on the command-line: VSCODE_DEV=1 vscode/.build/electron/Code\ -\ OSS.app/Contents/MacOS/Electron vscode/out/cli.js repo-name

@deepak1556
Copy link
Collaborator

How are you running the open command ? Is it via the cli wrapper, if not can you provide the full command used.

@rzhao271
Copy link
Contributor Author

vscode/out/cli.js is the cli wrapper, and that calls the spawn function to run the open command. The open command has the --env arg so I can try using that. spawn also has an options param, though I left it blank for now.

@deepak1556
Copy link
Collaborator

Yes you need to pass the environment set via the spawn options into the open command for things to work correctly

const options: SpawnOptions = {
detached: true,
env
};

@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster macos Issues with VS Code on MAC/OS X workbench-cli VS Code Command line issues
Projects
None yet
Development

No branches or pull requests

2 participants