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

permanently adding vscode to command path on OSX #48124

Closed
tansaku opened this issue Apr 18, 2018 · 10 comments
Closed

permanently adding vscode to command path on OSX #48124

tansaku opened this issue Apr 18, 2018 · 10 comments

Comments

@tansaku
Copy link

@tansaku tansaku commented Apr 18, 2018

So there is an SO question related to this issue: https://stackoverflow.com/questions/29971053/how-to-open-visual-studio-code-from-the-command-line-on-osx

  • VSCode Version: 1.21.0
  • OS Version: 10.12.6

Steps to Reproduce:

  1. Install VSCode on OSX
  2. Follow instructions at https://code.visualstudio.com/docs/setup/mac

To manually add VS Code to your path:

cat << EOF >> ~/.bash_profile
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
  1. then reboot computer and discover that the above does not work

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

I think that's not related. Currently on OSX, the path specified does not exist. There is a path for VSCode on OSX which is:

/Applications/Visual\ Studio.app/Contents/Resources/

but app and bin are not in there. Running the Command Pallette install code command sets up the path like this:

/usr/local/bin/code -> /private/var/folders/2z/kh7rq7jn5l3gpbldyfg1tb4c0000gn/T/AppTranslocation/E7F7AA38-E6B4-464B-9FA3-16F7331DF248/d/Visual Studio Code.app/Contents/Resources/app/bin/code

It's frustrating to have to re-run the command pallette short cut to get code working on the command line every time the computer restarts. Even if impossible the documentation should be updated not to give misleading information that it can be done.

@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Apr 23, 2018

@tansaku OS X declared Code to be in quarantine in your system. You must remove it from quarantine:

https://derflounder.wordpress.com/2012/11/20/clearing-the-quarantine-extended-attribute-from-downloaded-applications/

@joaomoreno joaomoreno closed this Apr 23, 2018
@tansaku

This comment has been minimized.

Copy link
Author

@tansaku tansaku commented Apr 24, 2018

thanks @joaomoreno - however I followed the instructions in the site you linked to, but according to the output from the terminal the app is not in quarantine on my computer:

[tansaku@Samuels-MBP:/Applications ]$ 
→ xattr /Applications/Visual\ Studio.app
[tansaku@Samuels-MBP:/Applications ]$ 

I ran the sudo xattr -r -d com.apple.quarantine /Applications/Visual\ Studio.app command anyway, but it didn't make any difference. I still don't have the folders specified in the set up code to run permanently on the command line script from the instructions:

/Applications/Visual Studio Code.app/Contents/Resources/app/bin

I have

Visual\ Studio.app/Contents/Resources/

but it contains neither app nor bin directories. So I would content that the documentation is currently incorrect for OSX 10.12.6

Would you be willing to re-open this issue so that we can try to work out a solution?

@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Apr 24, 2018

Did you rename Visual Studio Code.app to Visual Studio.app?

@tansaku

This comment has been minimized.

Copy link
Author

@tansaku tansaku commented Apr 24, 2018

@joaomoreno not myself

@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Apr 24, 2018

Where did you download Code from?

@tansaku

This comment has been minimized.

Copy link
Author

@tansaku tansaku commented Apr 24, 2018

@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Apr 24, 2018

If you download it again, what's the name of the app?

@tansaku

This comment has been minimized.

Copy link
Author

@tansaku tansaku commented Apr 24, 2018

It seems to be as predicted - for some reason I have also got a Visual\ Studio.app - is that something different again?

@joaomoreno

This comment has been minimized.

Copy link
Member

@joaomoreno joaomoreno commented Apr 25, 2018

What do you mean? I just downloaded that exact ZIP, extracted it and inside is an application called Visual Studio Code.app. How about for you?

@tansaku

This comment has been minimized.

Copy link
Author

@tansaku tansaku commented Apr 27, 2018

yep that's what I get - I must have had something else called Visual\ Studio.app that was downloaded from somewhere different in the past.

It's all working as described now - thanks for your help :-)

@tansaku tansaku closed this Apr 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.