We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faf706f commit f3cdfc2Copy full SHA for f3cdfc2
src/runtime/loader.ts
@@ -1,6 +1,6 @@
1
import { walk } from "@std/fs";
2
import { parseArgs as parse } from "@std/cli";
3
-import { basename, join, toFileUrl } from "@std/path";
+import { basename, join, toFileUrl, isAbsolute } from "@std/path";
4
5
const flags = parse(Deno.args, {
6
string: ["root"],
@@ -28,7 +28,9 @@ for await (const path of walk(flags.root)) {
28
29
const loadWorker = async () => {
30
while (true) {
31
- const scriptUrl = toFileUrl(join(Deno.cwd(), path.path));
+ const scriptUrl = toFileUrl(
32
+ isAbsolute(path.path) ? path.path : join(Deno.cwd(), path.path)
33
+ );
34
console.info("Load script", path.path, scriptUrl.href);
35
36
const worker = new Worker(scriptUrl, {
0 commit comments