Skip to content

Commit cda47a2

Browse files
fix(jco): fix older wasi test on windows
1 parent 1812db7 commit cda47a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/jco/src/cmd/componentize.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { resolve, basename } from "node:path";
33

44
import * as wasmToolsComponent from "../../obj/wasm-tools.js";
55

6-
import { styleText } from "../common.js";
6+
import { styleText, isWindows } from "../common.js";
77

88
/** All features that can be enabled/disabled */
99
const ALL_FEATURES = ["clocks", "http", "random", "stdio", "fetch-event"];
@@ -21,6 +21,7 @@ const DEBUG_FEATURES = ["stdio"];
2121
async function usesOlderWasiHTTP(witPath, worldName) {
2222
await wasmToolsComponent.$init;
2323

24+
witPath = (isWindows ? "//?/" : "") + resolve(witPath);
2425
const worldMetadata = wasmToolsComponent.tools.componentWitMetadataForWorld(
2526
{ tag: "path", val: witPath },
2627
worldName ?? null,

0 commit comments

Comments
 (0)