Skip to content

Commit ba4052d

Browse files
committed
feat: use relative path in the value of file source
1 parent 44e66df commit ba4052d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/source/file.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { enumerate } from "@core/iterutil/async/enumerate";
2+
import { relative } from "@std/path/relative";
23
import { SEPARATOR } from "@std/path/constants";
34

45
import { defineSource, type Source } from "../../source.ts";
@@ -58,7 +59,7 @@ export function file(options: Readonly<FileOptions> = {}): Source<Detail> {
5859
) {
5960
yield {
6061
id,
61-
value: path,
62+
value: relative(root, path),
6263
detail: { path },
6364
};
6465
}

0 commit comments

Comments
 (0)