fix(update-nvim-config): repair the command and match file to label

The one-line bash -c string had been re-wrapped mid-command, so bash
ran a bare pkill, then a headless nvim that never exited, and never
reached git pull. launchd won't start a job that is still running, so
the config had stopped updating altogether.

Put one command per line, escape &&, and move PATH into
EnvironmentVariables. Rename the plist to match its label, which is
also the name setup_automations.sh bootstraps; before this, a fresh
install downloaded update-nvim-config.plist and then failed to load it.
This commit is contained in:
Jason Ross
2026-09-27 15:37:13 -05:00
parent 607aa69beb
commit cbdd4df33c
2 changed files with 10 additions and 4 deletions
@@ -8,12 +8,18 @@
<array>
<string>/bin/bash</string>
<string>-c</string>
<!-- One command per line: bash runs each line separately. -->
<string>
export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
pkill nvim || true
cd "$HOME/.config/nvim" && git checkout main && git pull origin main
pkill nvim
cd "$HOME/.config/nvim" || exit 1
git checkout main &amp;&amp; git pull origin main
</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
+1 -1
View File
@@ -5,7 +5,7 @@ fi
cd "$HOME/Library/LaunchAgents" || exit 1
curl -LO https://github.com/JMR-dev/mac_util_scripts/raw/refs/heads/main/LaunchAgents/com.user.homebrew-update.plist
curl -LO https://github.com/JMR-dev/mac_util_scripts/raw/refs/heads/main/LaunchAgents/com.user.restart-browsers.plist
curl -LO https://github.com/JMR-dev/mac_util_scripts/raw/refs/heads/main/LaunchAgents/update-nvim-config.plist
curl -LO https://github.com/JMR-dev/mac_util_scripts/raw/refs/heads/main/LaunchAgents/com.user.update-nvim-config.plist
# Install Commands
launchctl bootstrap gui/"$(id -u)" com.user.homebrew-update.plist
launchctl bootstrap gui/"$(id -u)" com.user.restart-browsers.plist