Skip to content

Commit af6d2c1

Browse files
amishneAndrewKushnir
authored andcommitted
fix: load environment config using file URL on Windows
Fixes #260.
1 parent 551ded9 commit af6d2c1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

runner/configuration/environment-resolution.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {existsSync} from 'fs';
22
import {dirname} from 'path';
3+
import {pathToFileURL} from 'url';
34
import {fromZodError} from 'zod-validation-error/v3';
45
import {RunnerName} from '../codegen/runner-creation.js';
56
import {toProcessAbsolutePath} from '../file-system-utils.js';
@@ -27,7 +28,7 @@ export async function getEnvironmentByPath(
2728
throw new UserFacingError(`Cannot find environment config file at ${configPath}`);
2829
}
2930

30-
const result: {default: unknown} = await import(configPath);
31+
const result: {default: unknown} = await import(pathToFileURL(configPath).toString());
3132
const rootPath = dirname(configPath);
3233
const config = result.default;
3334
assertIsEnvironmentConfig(config);

0 commit comments

Comments
 (0)