Skip to content

Commit

Permalink
Merge pull request #825 from hackclub/show-path-command
Browse files Browse the repository at this point in the history
Show command to path details on install failure
  • Loading branch information
maxwofford authored Nov 21, 2024
2 parents dd37819 + 7e40154 commit 0774d1c
Showing 1 changed file with 13 additions and 14 deletions.
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

0 comments on commit 0774d1c

Please sign in to comment.