Explain executable launch type assertions

This commit is contained in:
Brennan Benson
2026-11-13 13:54:54 -08:00
parent d424c62d86
commit 0dbb33a44e
2 changed files with 2 additions and 0 deletions
@@ -29,6 +29,7 @@ export function gitExecFileSync(
// Host Git only: a WSL path would make this a synchronous wsl.exe that can boot the distro.
throw new Error('Synchronous Git cannot run in a WSL folder. Use asynchronous Git for it.')
}
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: A BufferEncoding is always supplied, so execFileSync returns text.
return execNativeFileSync(
resolved.binary,
resolved.args,
@@ -96,6 +96,7 @@ function noChildSyncFailure(result: unknown): boolean {
if (result === null || typeof result !== 'object') {
return false
}
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: Every read is compared with an exact value or passed to the unknown-value error guard.
const value = result as {
pid?: number
status?: number | null