mirror of
https://github.com/theniceboy/.config.git
synced 2026-02-22 12:55:39 +08:00
make tmux config graceful when agent-tracker unavailable
This commit is contained in:
parent
69984585d0
commit
2f0fb14065
3 changed files with 17 additions and 12 deletions
|
|
@ -130,8 +130,13 @@ load_tracker_info() {
|
|||
fi
|
||||
|
||||
if [[ -z "$tracker_lines" ]]; then
|
||||
local tracker_bin="$HOME/.config/agent-tracker/bin/tracker-client"
|
||||
if [[ ! -x "$tracker_bin" ]]; then
|
||||
rm -f "$TRACKER_CACHE_FILE" 2>/dev/null || true
|
||||
return
|
||||
fi
|
||||
local tracker_state
|
||||
tracker_state=$(~/.config/agent-tracker/bin/tracker-client state 2>/dev/null || true)
|
||||
tracker_state=$("$tracker_bin" state 2>/dev/null || true)
|
||||
if [[ -z "$tracker_state" ]]; then
|
||||
rm -f "$TRACKER_CACHE_FILE" 2>/dev/null || true
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue