Commit 302cf91
Baudbot
fix: unset PKG_EXECPATH and stale varlock-managed env vars in startup-cleanup
When startup-cleanup.sh runs mid-session (called by the control agent),
inherited env vars cause bridge startup failures:
1. PKG_EXECPATH — leaked from the parent varlock-launched process, causes
varlock's SEA binary to misinterpret subcommands as Node module paths.
The varlock broker-key probes (lines 115-122) silently fail, resulting
in 'No Slack transport configured' and the bridge never starting.
2. varlock run does not override env vars already present in the parent
process. If any managed value (broker tokens, API keys, config) was
rotated after session start, the supervisor passes the stale values
instead of reading fresh ones from ~/.config/.env.
Fix:
- unset PKG_EXECPATH at the script top (before varlock probes)
- In the supervisor subshell, dynamically unset ALL varlock-managed keys
via 'varlock load --format env' before calling 'varlock run', so every
restart gets fresh values regardless of which keys changed.
Regression from #148.1 parent 94790e3 commit 302cf91
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
143 | 158 | | |
144 | 159 | | |
145 | 160 | | |
| |||
0 commit comments