Skip to content

Commit

Permalink
try to fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Jun 27, 2024
1 parent 8ed97a4 commit 2ac2ce6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/utils/execve.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Deno.test("execve.ts", async runner => {
}
})

const thisfile = new Path(new URL(import.meta.url).pathname)
const thisfile = new Path(import.meta.filename!)
console.error(`DEBUG: thisfile=${thisfile}`)

await runner.step("file exists but is not executable", () => {
const cmd = [thisfile.string, ...faker_args()]
Expand Down
3 changes: 2 additions & 1 deletion src/utils/execve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export default function({cmd: args, env}: {cmd: string[], env: Record<string, st
Deno.UnsafePointer.of(argv),
Deno.UnsafePointer.of(envp))

console.error(`DEBUG: execve: errno=${errno} path=${parse_Path(args[0])}`)

switch (errno) {
case 2: //ENOENT:
// yes: strange behavior from execve here indeed
Expand All @@ -42,7 +44,6 @@ export default function({cmd: args, env}: {cmd: string[], env: Record<string, st
case 26: //ETXTBSY:
throw new PkgxError(`execve (${errno})`)
}

throw new ProgrammerError(`execve (${errno})`)
}

Expand Down

0 comments on commit 2ac2ce6

Please sign in to comment.