Skip to content

Commit

Permalink
fix test failure on musl
Browse files Browse the repository at this point in the history
  • Loading branch information
pfgithub committed Jan 10, 2025
1 parent 68c2f41 commit 7d57c09
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/cli/install/bun-run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,13 @@ describe("should run scripts from the project root (#16169)", async () => {
cwd: dir + "/run_here/dont_run_in_here",
env: bunEnv,
});
expect(run_inside.stderr.toString()).toBe('error: Module not found "myscript.ts"\n');
const stderr = run_inside.stderr.toString();
if (stderr.includes("myscript.ts") && stderr.includes("EACCESS")) {
// for some reason on musl, the run_here folder is in $PATH
// 'error: Failed to run "myscript.ts" due to:\nEACCES: run_here/myscript.ts: Permission denied (posix_spawn())'
} else {
expect(stderr).toBe('error: Module not found "myscript.ts"\n');
}
expect(run_inside.exitCode).toBe(1);
});

Expand Down

0 comments on commit 7d57c09

Please sign in to comment.