From 2cf9b335b991b5fe0fbf6bd1dd090f5ee6fba5b3 Mon Sep 17 00:00:00 2001 From: amishne Date: Tue, 5 May 2026 11:00:18 -0700 Subject: [PATCH] fix: load environment config using file URL on Windows Fixes #260. --- runner/configuration/environment-resolution.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runner/configuration/environment-resolution.ts b/runner/configuration/environment-resolution.ts index b547a77a..edcb6dd6 100644 --- a/runner/configuration/environment-resolution.ts +++ b/runner/configuration/environment-resolution.ts @@ -1,5 +1,6 @@ import {existsSync} from 'fs'; import {dirname} from 'path'; +import {pathToFileURL} from 'url'; import {fromZodError} from 'zod-validation-error/v3'; import {RunnerName} from '../codegen/runner-creation.js'; import {toProcessAbsolutePath} from '../file-system-utils.js'; @@ -27,7 +28,7 @@ export async function getEnvironmentByPath( throw new UserFacingError(`Cannot find environment config file at ${configPath}`); } - const result: {default: unknown} = await import(configPath); + const result: {default: unknown} = await import(pathToFileURL(configPath).toString()); const rootPath = dirname(configPath); const config = result.default; assertIsEnvironmentConfig(config);