From 913ff9d9138f9fb42ecad0f4550884bbfde9bdd5 Mon Sep 17 00:00:00 2001 From: Christopher Snyder Date: Wed, 8 Jul 2026 12:19:03 -0400 Subject: [PATCH] Apply mechanical fixes from repo review - Fix /Volumess typo so /Volumes is actually unhidden - Drop http:// insteadOf rewrite that downgraded ssh remotes to plain http - Add set -euo pipefail to all chezmoi scripts so failures surface in CI (guard $CI expansion and tolerate killall when Safari isn't running) - Add ripgrep and fd, required by the Neovim telescope config Co-Authored-By: Claude Fable 5 --- .chezmoidata/packages.yml | 4 ++++ .chezmoiscripts/run_once_20_install_nvm.sh | 2 ++ .chezmoiscripts/run_once_30_install_npm_globals.sh | 2 ++ .../run_onchange_darwin-install-packages.sh.tmpl | 2 ++ .chezmoiscripts/run_onchange_set_mac_os_defaults.sh | 9 ++++++--- dot_gitconfig.tmpl | 3 --- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.chezmoidata/packages.yml b/.chezmoidata/packages.yml index 27bfdc2..6714b55 100644 --- a/.chezmoidata/packages.yml +++ b/.chezmoidata/packages.yml @@ -18,6 +18,10 @@ packages: - zsh-autosuggestions - zsh-syntax-highlighting - fzf + # ripgrep and fd are required by the Neovim telescope config + # (live_grep needs rg; find_files uses fd when available) + - ripgrep + - fd - bat - git-delta - starship diff --git a/.chezmoiscripts/run_once_20_install_nvm.sh b/.chezmoiscripts/run_once_20_install_nvm.sh index 92c450e..ca21e08 100644 --- a/.chezmoiscripts/run_once_20_install_nvm.sh +++ b/.chezmoiscripts/run_once_20_install_nvm.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash export NVM_DIR="$HOME/.nvm" diff --git a/.chezmoiscripts/run_once_30_install_npm_globals.sh b/.chezmoiscripts/run_once_30_install_npm_globals.sh index 216cbe7..b546e57 100755 --- a/.chezmoiscripts/run_once_30_install_npm_globals.sh +++ b/.chezmoiscripts/run_once_30_install_npm_globals.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + # Load nvm so npm is available export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" diff --git a/.chezmoiscripts/run_onchange_darwin-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_darwin-install-packages.sh.tmpl index ebfbd61..ba6c5ee 100644 --- a/.chezmoiscripts/run_onchange_darwin-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_darwin-install-packages.sh.tmpl @@ -1,6 +1,8 @@ {{ if eq .chezmoi.os "darwin" -}} #!/bin/bash +set -euo pipefail + {{ range .packages.darwin.taps -}} brew tap {{ . | quote }} brew trust {{ . | quote }} diff --git a/.chezmoiscripts/run_onchange_set_mac_os_defaults.sh b/.chezmoiscripts/run_onchange_set_mac_os_defaults.sh index d342204..1e18102 100644 --- a/.chezmoiscripts/run_onchange_set_mac_os_defaults.sh +++ b/.chezmoiscripts/run_onchange_set_mac_os_defaults.sh @@ -1,12 +1,14 @@ #!/bin/bash +set -euo pipefail + # Configures various Mac OS default to my peferences. # A list of Mac OS defaults can be found at https://macos-defaults.com/ # CI runners have no interactive login session, so osascript/System Events # automation here would hang waiting on a TCC permission dialog nobody can # click, and there's no real machine state worth changing on a throwaway VM. -if [ -n "$CI" ]; then +if [ -n "${CI:-}" ]; then echo "Running in CI — skipping macOS defaults (requires an interactive GUI session)" exit 0 fi @@ -60,7 +62,8 @@ killall Dock # Safari defaults write -app Safari "ShowFullURLInSmartSearchField" -bool "true" -killall Safari 2>/dev/null +# killall fails when Safari isn't running, which is fine +killall Safari 2>/dev/null || true # Finder defaults write NSGlobalDomain "AppleShowAllExtensions" -bool "true" @@ -74,7 +77,7 @@ defaults write NSGlobalDomain "NSToolbarTitleViewRolloverDelay" -float "0" # Use list view by default defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" # Show the /Volumes folder -sudo chflags nohidden /Volumess +sudo chflags nohidden /Volumes killall Finder diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index ce1f785..a7e6456 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -54,9 +54,6 @@ [commit] gpgsign = true -[url "http://github.com/"] - insteadOf = ssh://git@github.com/ - [url "https://github.com/"] insteadOf = git://github.com/