* Quietly log a diagnostic line to `auto-update.log`. Never throws — a bad * file write must not take down the CLI.
(line: string)
| 56 | * file write must not take down the CLI. |
| 57 | */ |
| 58 | function log(line: string): void { |
| 59 | try { |
| 60 | mkdirSync(CONFIG_DIR, { recursive: true, mode: 0o700 }); |
| 61 | appendFileSync(LOG_FILE, `${new Date().toISOString()} ${line}\n`, { mode: 0o600 }); |
| 62 | } catch { |
| 63 | /* best-effort */ |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Spawn a detached child to run the install command. Stdout/stderr land in |
no outgoing calls
no test coverage detected