Skip to content

Commit

Permalink
Fix this test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Sep 26, 2024
1 parent f2328cf commit bae1e69
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/js/bun/shell/exec.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { $ } from "bun";
import { describe, expect, test } from "bun:test";
import { bunEnv, tmpdirSync } from "harness";
import { bunEnv, bunExe, tmpdirSync } from "harness";
import { join } from "path";
import { createTestBuilder } from "./test_builder";
const TestBuilder = createTestBuilder(import.meta.path);

const BUN = process.argv0;
const BUN = bunExe();

$.nothrow();
describe("bun exec", () => {
Expand Down Expand Up @@ -86,8 +86,9 @@ describe("bun exec", () => {

test("works with latin1 paths", async () => {
const tempdir = tmpdirSync();
await Bun.write(join(tempdir, "Í", "hi"), "text");
const result = await $`bun exec ls`
const abs = join(tempdir, "Í", "hi");
await Bun.write(abs, "text");
const result = await $`${BUN} exec ls`
.env({ ...(bunEnv as any) })
.cwd(join(tempdir, "Í"))
.quiet();
Expand Down

0 comments on commit bae1e69

Please sign in to comment.