Skip to content

Commit

Permalink
Merge pull request #86 from svenluijten/patch-1
Browse files Browse the repository at this point in the history
Recommend only updating the lock file in exception
  • Loading branch information
localheinz authored Oct 7, 2018
2 parents 021b226 + 3dd6515 commit c28f2e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Command/NormalizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
$locker = $composer->getLocker();

if ($locker->isLocked() && !$locker->isFresh()) {
$io->writeError('<error>The lock file is not up to date with the latest changes in composer.json, it is recommended that you run `composer update`.</error>');
$io->writeError('<error>The lock file is not up to date with the latest changes in composer.json, it is recommended that you run `composer update --lock`.</error>');

return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Command/NormalizeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public function testExecuteFailsIfLockerIsLockedButNotFresh(): void
$io = $this->prophesize(IO\ConsoleIO::class);

$io
->writeError(Argument::is('<error>The lock file is not up to date with the latest changes in composer.json, it is recommended that you run `composer update`.</error>'))
->writeError(Argument::is('<error>The lock file is not up to date with the latest changes in composer.json, it is recommended that you run `composer update --lock`.</error>'))
->shouldBeCalled();

$locker = $this->prophesize(Package\Locker::class);
Expand Down

0 comments on commit c28f2e9

Please sign in to comment.