(line)
| 82 | * the log file stays readable. |
| 83 | */ |
| 84 | export function notify(line) { |
| 85 | const text = line + '\n'; |
| 86 | try { |
| 87 | writeFileSync(TERMINAL_DEVICE, text); |
| 88 | return; |
| 89 | } catch { |
| 90 | // Terminal device not writable (CI, sandboxed environments). |
| 91 | } |
| 92 | process.stdout.write(stripAnsi(text)); |
| 93 | } |
| 94 | |
| 95 | // Single-quote `path` for safe interpolation in a POSIX `sh` command. |
| 96 | // Wraps in single quotes and escapes any embedded `'` as `'\''`. |
no test coverage detected