Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"engines": {
"node": ">=14.14.0"
},
"exports": {
"./package.json": "./package.json"
},
"license": "MIT",
"packageManager": "yarn@4.0.0-rc.15+sha224.7fa5c1d1875b041cea8fcbf9a364667e398825364bf5c5c8cd5f6601",
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion tests/_runCli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {PortablePath, npath} from '@yarnpkg/fslib';
import {spawn} from 'child_process';
import {dirname, join} from 'path';

export async function runCli(cwd: PortablePath, argv: Array<string>): Promise<{exitCode: number | null, stdout: string, stderr: string}> {
const out: Array<Buffer> = [];
Expand All @@ -8,7 +9,7 @@ export async function runCli(cwd: PortablePath, argv: Array<string>): Promise<{e
return new Promise((resolve, reject) => {
if (process.env.RUN_CLI_ID)
(process.env.RUN_CLI_ID as any)++;
const child = spawn(process.execPath, [`--no-warnings`, `-r`, require.resolve(`./recordRequests.js`), require.resolve(`corepack/dist/corepack.js`), ...argv], {
const child = spawn(process.execPath, [`--no-warnings`, `-r`, require.resolve(`./recordRequests.js`), join(dirname(require.resolve(`corepack/package.json`)), `dist/corepack.js`), ...argv], {
Comment thread
aduh95 marked this conversation as resolved.
Outdated
cwd: npath.fromPortablePath(cwd),
env: process.env,
stdio: `pipe`,
Expand Down