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

Show command to path details on install failure #825

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions public/scripts/hackatime-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,19 @@ configure_wakatime() {
check_vscode() {
log "Checking for VS Code installation..."
if ! command -v code &>/dev/null; then
error "VS Code is not installed. Install it from https://code.visualstudio.com/Download"
if [ "$VERBOSE" = true ]; then
case "$OSTYPE" in
darwin*)
error "(In VS Code, press ⌘⇧P and type \"Shell Command: Install 'code' command in PATH\".)"
;;
msys* | win32*)
error "(In VS Code, press Ctrl+Shift+P and type \"Shell Command: Install 'code' command in PATH\".)"
;;
*)
error "(In VS Code, press Ctrl+Shift+P and type \"Shell Command: Install 'code' command in PATH\".)"
;;
esac
fi
error "Couldn't detect VS Code! Install it from https://code.visualstudio.com/Download. If you already installed it, try this:"
case "$OSTYPE" in
darwin*)
error "(In VS Code, press ⌘⇧P and type \"Shell Command: Install 'code' command in PATH\". Then press 'Enter'.)"
;;
msys* | win32*)
error "(In VS Code, press Ctrl+Shift+P and type \"Shell Command: Install 'code' command in PATH\". Then press 'Enter'.)"
;;
*)
error "(In VS Code, press Ctrl+Shift+P and type \"Shell Command: Install 'code' command in PATH\". Then press 'Enter'.)"
;;
esac
error "Once that's done, restart this script."
exit 1
fi
}
Expand Down
Loading