Type improvements:
- `delayCleanupTemp: any` → `boolean`
- `toolchainPath: any` → `string | undefined`
Changed `getToolchainPath()` to return `string | undefined` instead of
`string | false`. Using `false` as an absence marker is non-idiomatic
TypeScript; `undefined` is the standard pattern and enables proper use
of nullish coalescing (`??`).
Fixed bug in `changeOptionsBasedOnOverrides`:
Before:
const sysrootPath = overriddenToolchainPath ??
getSysrootByToolchainPath(overriddenToolchainPath);
The right side was never reached because `false` is not nullish (only
`null`/`undefined` trigger `??` fallback). Additionally, it passed
`overriddenToolchainPath` to the fallback, which would be `false`/`undefined`
when the fallback is needed - clearly a typo.
After:
const sysrootPath = overriddenToolchainPath ??
(this.toolchainPath ? getSysrootByToolchainPath(this.toolchainPath) : undefined);
Now properly falls back to computing sysroot from the default toolchain
path when no override is specified.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>