Skip to content

Commit cb7f4be

Browse files
committed
fix cd
1 parent 9905d55 commit cb7f4be

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

bin/handlers/yarn-handler.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export function parseYarnHelp(helpText: string): Record<string, string> {
9191
export async function getYarnCommandsFromMainHelp(): Promise<
9292
Record<string, string>
9393
> {
94-
const output = await safeExec('cd /tmp && yarn --help');
94+
const output = await safeExec('yarn --help');
9595
return output ? parseYarnHelp(output) : {};
9696
}
9797

@@ -127,8 +127,7 @@ export function parseYarnOptions(
127127
}
128128

129129
function loadYarnOptionsSync(cmd: LazyCommand, command: string): void {
130-
// Use cd /tmp to avoid packageManager constraints
131-
const output = safeExecSync(`cd /tmp && yarn ${command} --help`);
130+
const output = safeExecSync(`yarn ${command} --help`);
132131
if (!output) return;
133132

134133
const options = parseYarnOptions(output, { flagsOnly: false });

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,5 @@
7777
"import": "./dist/commander.js",
7878
"require": "./dist/commander.cjs"
7979
}
80-
},
81-
"packageManager": "[email protected]+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b"
80+
}
8281
}

0 commit comments

Comments
 (0)