spawn/packages
A ad38a66c96
fix: extend HOME hardening to local.ts and commands.ts (missed by #2026/#2036) (#2037)
When HOME is unset (containers, systemd, cron, some CI), two files still used
`process.env.HOME || ""` which produces broken paths:
- local/local.ts:38 — uploadFile() expands ~ to "", writing config files to
  filesystem root (e.g. /.openclaw/openclaw.json) instead of ~/.openclaw/
- commands.ts:898 — hasCloudConfigCredentials() checks "" + .config/spawn/
  resolving to /.config/spawn/{cloud}.json, silently failing credential
  detection and causing false "Missing credentials" warnings on every run

Fix: add `import { homedir } from "node:os"` to both files and change
`process.env.HOME || ""` to `process.env.HOME || homedir()`.

Completes the HOME hardening series started in #2026 and #2036.

Agent: team-lead

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-28 15:27:29 -08:00
..
cli fix: extend HOME hardening to local.ts and commands.ts (missed by #2026/#2036) (#2037) 2026-02-28 15:27:29 -08:00
shared feat!: remove Fly.io cloud provider support (#1979) 2026-02-27 00:06:32 -05:00