Commit ae29780
committed
fix(dream-cli): double-quote tmpdir in gpu_reassign RETURN trap
_gpu_reassign registered a cleanup trap with single-quoted
outer syntax, so $tmpdir expansion was deferred until fire
time. RETURN traps are process-level (not function-scoped),
so when the function returns to cmd_gpu the trap fires again
in cmd_gpu's scope where $tmpdir is unbound. Under set -u
that triggers 'tmpdir: unbound variable' and exit 1 even
on successful reassign.
Switched to double-quoted outer to bake $tmpdir in at
trap-set time (single-quoted inner keeps paths with spaces
safe). Matches the already-landed pattern at dream-cli:542.
macOS Apple Silicon and AMD paths are unaffected (the
nvidia-smi early-return at line 2825 precedes the trap
registration). Linux NVIDIA and Windows WSL2 + NVIDIA
passthrough are the affected surface.1 parent d5154c3 commit ae29780
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2866 | 2866 | | |
2867 | 2867 | | |
2868 | 2868 | | |
2869 | | - | |
| 2869 | + | |
2870 | 2870 | | |
2871 | 2871 | | |
2872 | 2872 | | |
| |||
0 commit comments