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:
+9
-3
@@ -8,12 +8,18 @@
|
|||||||
<array>
|
<array>
|
||||||
<string>/bin/bash</string>
|
<string>/bin/bash</string>
|
||||||
<string>-c</string>
|
<string>-c</string>
|
||||||
|
<!-- One command per line: bash runs each line separately. -->
|
||||||
<string>
|
<string>
|
||||||
export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
|
pkill nvim
|
||||||
pkill nvim || true
|
cd "$HOME/.config/nvim" || exit 1
|
||||||
cd "$HOME/.config/nvim" && git checkout main && git pull origin main
|
git checkout main && git pull origin main
|
||||||
</string>
|
</string>
|
||||||
</array>
|
</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>
|
<key>StartCalendarInterval</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Hour</key>
|
<key>Hour</key>
|
||||||
@@ -5,7 +5,7 @@ fi
|
|||||||
cd "$HOME/Library/LaunchAgents" || exit 1
|
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.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/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
|
# Install Commands
|
||||||
launchctl bootstrap gui/"$(id -u)" com.user.homebrew-update.plist
|
launchctl bootstrap gui/"$(id -u)" com.user.homebrew-update.plist
|
||||||
launchctl bootstrap gui/"$(id -u)" com.user.restart-browsers.plist
|
launchctl bootstrap gui/"$(id -u)" com.user.restart-browsers.plist
|
||||||
|
|||||||
Reference in New Issue
Block a user