@plot-pm/board 0.23.1 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,11 +124,11 @@ plot_monitor_subject() {
124
124
  # PRODUCTION IS UNCHANGED: a real worktree outlives its agent, so the
125
125
  # directory is present and this reads `starting` exactly as before.
126
126
  if [ ! -f "$pid_file" ]; then
127
- [ -d "$(dirname "$pid_file")" ] && { printf 'starting'; return 0; }
127
+ [ -d "${pid_file%/*}" ] && { printf 'starting'; return 0; }
128
128
  printf 'gone'; return 0
129
129
  fi
130
130
 
131
- pid=$(cat "$pid_file" 2>/dev/null | tr -d ' \n')
131
+ read -r pid < "$pid_file" 2>/dev/null
132
132
 
133
133
  # A file that exists but holds no digits is a half-written pid, which is the
134
134
  # startup window caught mid-`printf`. Not gone — UNLESS the wrapper has
@@ -140,7 +140,7 @@ plot_monitor_subject() {
140
140
  # would read `starting` forever.
141
141
  case "$pid" in
142
142
  '' | *[!0-9]*)
143
- if [ -f "$(dirname "$pid_file")/.plot-worker.exit" ]; then
143
+ if [ -f "${pid_file%/*}/.plot-worker.exit" ]; then
144
144
  printf 'gone'; return 0
145
145
  fi
146
146
  printf 'starting'; return 0 ;;