test(sandbox): close Windows ACL coverage gaps

This commit is contained in:
Tianyi Cui
2026-08-10 23:16:34 +08:00
parent d3715052ea
commit e475984706
2 changed files with 37 additions and 4 deletions
@@ -239,6 +239,8 @@ export class AclSandbox {
this.tempWriteSidPtr = this.tempWriteSid === undefined ? undefined : parseSid(this.tempWriteSid)
const tempDir = this.mode === 'read-only' || this.tempDirOption === null ? null : this.tempDirOption
/* v8 ignore next -- constructor validation requires workspace-write to supply
an explicit temp directory or null; the other branches normalize to null. */
if (tempDir === undefined) throw new Error('AclSandbox workspace-write temp directory was not resolved')
if (tempDir !== null) {
if (!existsSync(tempDir) || !statSync(tempDir).isDirectory()) {