Skip to content

Commit c061823

Browse files
committed
fix(cli): scope --no-frozen-lockfile to vp create only
Pass --no-frozen-lockfile to vp install only from vp create in CI, so yarn Berry can create fresh lockfiles without affecting vp install behavior in other contexts.
1 parent 82c1b82 commit c061823

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/cli/src/create/bin.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
439439
let selectedParentDir: string | undefined;
440440
let remoteTargetDir: string | undefined;
441441
let shouldSetupHooks = false;
442+
const installArgs = process.env.CI ? ['--no-frozen-lockfile'] : undefined;
442443

443444
if (!selectedTemplateName) {
444445
const template = await prompts.select({
@@ -804,7 +805,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
804805
installGitHooks(fullPath, compactOutput);
805806
}
806807
updateCreateProgress('Installing dependencies');
807-
const installSummary = await runViteInstall(fullPath, options.interactive, undefined, {
808+
const installSummary = await runViteInstall(fullPath, options.interactive, installArgs, {
808809
silent: compactOutput,
809810
});
810811
updateCreateProgress('Formatting code');
@@ -955,7 +956,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
955956

956957
updateWorkspaceConfig(projectDir, workspaceInfo);
957958
updateCreateProgress('Installing dependencies');
958-
installSummary = await runViteInstall(workspaceInfo.rootDir, options.interactive, undefined, {
959+
installSummary = await runViteInstall(workspaceInfo.rootDir, options.interactive, installArgs, {
959960
silent: compactOutput,
960961
});
961962
updateCreateProgress('Formatting code');

packages/cli/src/utils/prompts.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ export async function runViteInstall(
7373
const spinner = options?.silent ? getSilentSpinner() : getSpinner(interactive);
7474
const startTime = Date.now();
7575
spinner.start(`Installing dependencies...`);
76-
const ciArgs = process.env.CI ? ['--no-frozen-lockfile'] : [];
7776
const { exitCode, stderr, stdout } = await runCommandSilently({
7877
command: process.env.VP_CLI_BIN ?? 'vp',
79-
args: ['install', ...ciArgs, ...(extraArgs ?? [])],
78+
args: ['install', ...(extraArgs ?? [])],
8079
cwd,
8180
envs: process.env,
8281
});

0 commit comments

Comments
 (0)