Skip to content

Commit aa469f7

Browse files
committed
Fix cf uploader test path on Windows
1 parent 5b3eed9 commit aa469f7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/void/test/unit/cf-version-runner.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync
33
import { createServer } from 'node:http';
44
import { connect, type AddressInfo } from 'node:net';
55
import { tmpdir } from 'node:os';
6-
import { join } from 'node:path';
6+
import { dirname, join } from 'node:path';
77
import type { Duplex } from 'node:stream';
8+
import { fileURLToPath } from 'node:url';
89
import { getWorkerConfigPath } from '@cloudflare/build-output-utils';
910
import { afterEach, expect, it } from 'vite-plus/test';
1011
import {
@@ -264,7 +265,7 @@ it('pins live secrets in private Build Output and drops latest-version secret pr
264265
});
265266
await new Promise<void>((resolve) => server.listen(0, '127.0.0.1', resolve));
266267
try {
267-
const cf = join(new URL('.', import.meta.resolve('cf/package.json')).pathname, 'bin', 'cf');
268+
const cf = join(dirname(fileURLToPath(import.meta.resolve('cf/package.json'))), 'bin', 'cf');
268269
const dryRun = await new Promise<{ status: number | null; stderr: string }>((resolve) => {
269270
execFile(
270271
process.execPath,

0 commit comments

Comments
 (0)