Skip to content

Commit ce0876a

Browse files
authored
🐛 fix(#7697): use correct working directory for Deno environment (#7699)
1 parent 7b22b35 commit ce0876a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/dark-experts-scream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@builder.io/qwik': patch
3+
---
4+
5+
🐛 Fix(#7697): Use correct working directory for Deno environment

packages/qwik/src/optimizer/src/platform.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export async function getSystem() {
6666
sys.path = await sys.dynamicImport('node:path');
6767
sys.cwd = () => process.cwd();
6868
sys.os = process.platform;
69+
} else if (sysEnv === 'deno') {
70+
sys.path = await sys.dynamicImport('node:path');
71+
sys.cwd = (): string => Deno.cwd();
72+
sys.os = Deno.platform();
6973
}
7074

7175
return sys;

0 commit comments

Comments
 (0)