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
Update install_macos.sh #6390
Update install_macos.sh #6390
Conversation
The basic Mac installation of VS Code does not add it to the PATH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is brittle to the situation that VS Code is not in the expected location, right?
I think we could live with that but it would be nice if there was a way to ask Mac OS where it is (if it exists).
@@ -16,9 +16,8 @@ elan toolchain install stable | |||
elan default stable | |||
|
|||
# Install and configure VS Code | |||
if ! which code > /dev/null; then | |||
if ! "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" --install-extension leanprover.lean4; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ! "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" --install-extension leanprover.lean4; then | |
if ! "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" --install-extension leanprover.lean4 > /dev/null; then |
brew install --cask visual-studio-code | ||
# Install the Lean4 VS Code extension | ||
code --install-extension leanprover.lean4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we also provide the full path here?
code --install-extension leanprover.lean4 | |
"/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" --install-extension leanprover.lean4 |
Given this I guess we should capture this in a variable above.
@agjftucker Did you close this because we were too slow reviewing? If so, I'm sorry! |
The basic download-and-drag installation of VS Code does not add it to the PATH. So this commit calls it with its full pathname.
This script-driven install is the one advocated on the leanprover-community website and I am trying to make it a little smoother. It should work for both Intel and M1-based Macs and it would be great if the install page were to change to reflect that (see here). However I don't really understand why we diverge at all from the approach described in the Lean manual.