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.
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>com.user.update-nvim-config</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>/bin/bash</string>
|
|
<string>-c</string>
|
|
<!-- One command per line: bash runs each line separately. -->
|
|
<string>
|
|
pkill nvim
|
|
cd "$HOME/.config/nvim" || exit 1
|
|
git checkout main && 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>
|
|
<integer>23</integer>
|
|
<key>Minute</key>
|
|
<integer>55</integer>
|
|
</dict>
|
|
<key>StandardErrorPath</key>
|
|
<string>/tmp/com.user.update-nvim-config.err</string>
|
|
<key>StandardOutPath</key>
|
|
<string>/tmp/com.user.update-nvim-config.out</string>
|
|
</dict>
|
|
</plist>
|