Skip to content

Commit 96ba8b4

Browse files
authored
fix: revert the change to update the lock file when the --no-deps flag is used and issue a warning instead (#4713)
1 parent 961947e commit 96ba8b4

File tree

1 file changed

+2
-10
lines changed
  • packages/@ionic/cli/src/commands

1 file changed

+2
-10
lines changed

packages/@ionic/cli/src/commands/start.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -593,16 +593,8 @@ Use the ${input('--type')} option to start projects using older versions of Ioni
593593
const [installer, ...installerArgs] = await pkgManagerArgs(this.env.config.get('npmClient'), { command: 'install' });
594594
await this.env.shell.run(installer, installerArgs, shellOptions);
595595
} else {
596-
// --no-deps flag was used so skip installing dependencies, but update the lock file so that it's in sync with the package.json
597-
this.env.log.msg('Updating lockfile.');
598-
if (this.env.config.get('npmClient') === 'yarn') {
599-
// Yarn doesn't have an out of the box way to update the lock file without performing an install so warn the user that the lockfile might be out of date
600-
this.env.log.warn('Unable to update `yarn.lock` without installing dependencies. `yarn.lock` may be out of sync.');
601-
} else {
602-
// Perform an install that updates the lockfile without installing dependencies.
603-
const [installer, ...installerArgs] = await pkgManagerArgs(this.env.config.get('npmClient'), { command: 'install', lockFileOnly: true });
604-
await this.env.shell.run(installer, installerArgs, shellOptions);
605-
}
596+
// --no-deps flag was used so skip installing dependencies, this also results in the package.json being out sync with the package.json so warn the user
597+
this.env.log.warn('Using the --no-deps flag results in an out of date package lock file. The lock file can be updated by performing an `install` with your package manager.');
606598
}
607599

608600
if (!this.schema.cloned) {

0 commit comments

Comments
 (0)