fix(artifacts): mark Windows host executables by extension (#1823)
Windows has no POSIX execute bit; Node reports file modes from the read-only attribute alone, so every host file, including PE images, reported `executable: false` while the same occurrence reported `artifact_kind: executable`. Derive the host executable marking once: POSIX permission bits stay authoritative, and Windows marks regular files with the CreateProcess/cmd launchable extensions. Fixes #1819 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
76e4153d34
commit
91f843bf38
@@ -14,6 +14,7 @@ import {
|
||||
type ArtifactEntry,
|
||||
type ArtifactReader,
|
||||
} from "./ArtifactReader.js";
|
||||
import { hostExecutableMarking } from "./hostExecutableMarking.js";
|
||||
import { OwnedDirectoryHandle } from "../filesystem/OwnedDirectoryHandle.js";
|
||||
import { OwnedFileHandle } from "../filesystem/OwnedFileHandle.js";
|
||||
import { readFileHandleChunks } from "../filesystem/readFileHandleChunks.js";
|
||||
@@ -270,7 +271,7 @@ const artifactEntry = (
|
||||
kind,
|
||||
declaredSize: kind === "file" ? metadata.size : null,
|
||||
compressedSize: null,
|
||||
executable: (metadata.mode & 0o111) !== 0,
|
||||
executable: hostExecutableMarking(absolute, metadata),
|
||||
encrypted: false,
|
||||
byteOffset: null,
|
||||
declaredSha256: null,
|
||||
|
||||
Reference in New Issue
Block a user