From 0dbb33a44e053b9cf5e1f88bbaca2bd910f0d4e8 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 13 Nov 2026 13:54:54 -0800 Subject: [PATCH] Explain executable launch type assertions --- src/main/git/command-runner/git-exec-file-sync.ts | 1 + src/packages/process-host/src/native-process-spawn.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/git/command-runner/git-exec-file-sync.ts b/src/main/git/command-runner/git-exec-file-sync.ts index b6433a50911..9debd3b862f 100644 --- a/src/main/git/command-runner/git-exec-file-sync.ts +++ b/src/main/git/command-runner/git-exec-file-sync.ts @@ -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, diff --git a/src/packages/process-host/src/native-process-spawn.ts b/src/packages/process-host/src/native-process-spawn.ts index 15d7fb1096d..9f18aa2ee82 100644 --- a/src/packages/process-host/src/native-process-spawn.ts +++ b/src/packages/process-host/src/native-process-spawn.ts @@ -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