Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Oct 23, 2024
1 parent bfe7963 commit 7915d6b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/utils/execve.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ Deno.test("execve.ts", async runner => {
const f = Path.mktemp().join(args[0]).touch()
args[0] = f.string

console.error(f)

assertThrows(
() => execve({ cmd: args, env: {} }),
Deno.errors.PermissionDenied
Expand Down
2 changes: 1 addition & 1 deletion src/utils/execve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function({cmd: args, env}: {cmd: string[], env: Record<string, st

switch (errno) {
case 2: //ENOENT:
case 22: //EINVAL: (on Linux we're getting this for file is not executable since Deno 2 :/)
case 316: //FIXME ALERT! ALERT! BUG! SOMETHING IS WRONG WITH OUR USE OR ERRNO AND THIS SOMETIMES RESULTS, USUALLY ON MACOS :/
// yes: strange behavior from execve here indeed
if (parse_Path(args[0])?.exists()) {
Expand All @@ -53,7 +54,6 @@ export default function({cmd: args, env}: {cmd: string[], env: Record<string, st
throw new PkgxError(`execve (${errno})`)
}

console.error("FOO", errno)
throw new ProgrammerError(`execve (${errno})`)
}

Expand Down

0 comments on commit 7915d6b

Please sign in to comment.