Skip to content

Commit 45f515f

Browse files
committed
resolve config path
1 parent bad48e3 commit 45f515f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/src/ConfigBuilder.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ export const fromPath = Effect.fnUntraced(function*(
104104
const path = yield* Path.Path
105105

106106
const content = yield* Effect.orDie(fs.readFileString(outPath))
107+
const resolvedPath = path.resolve(outPath)
107108

108109
const context = VM.createContext({
109110
...globalThis,
110111
process,
111-
__filename: outPath,
112-
__dirname: path.dirname(outPath)
112+
__filename: resolvedPath,
113+
__dirname: path.dirname(resolvedPath)
113114
})
114115
context.require = Module.createRequire(entrypoint)
115116
context.module = { exports: {} }

0 commit comments

Comments
 (0)