Skip to content

Commit 7c31529

Browse files
author
Sebastian McKenzie
committed
only ignore lockfile in install command when the lockfile flag is false
1 parent 047e2eb commit 7c31529

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli/commands/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ function shouldWriteLockfileIfExists(flags: Object, args: Array<string>): boolea
364364
*/
365365

366366
function shouldWriteLockfile(flags: Object, args: Array<string>): boolean {
367-
if (!flags.lockfile) {
367+
if (flags.lockfile === false) {
368368
return false;
369369
}
370370

@@ -402,7 +402,7 @@ export async function run(
402402
args: Array<string>
403403
): Promise<void> {
404404
let lockfile;
405-
if (flags.lockfile) {
405+
if (flags.lockfile !== false) {
406406
lockfile = await Lockfile.fromDirectory(config.cwd, reporter, {
407407
strictIfPresent: isStrictLockfile(flags, args),
408408
save: hasSaveFlags(flags) || flags.initMirror

0 commit comments

Comments
 (0)