Skip to content

Commit

Permalink
Merge pull request #52 from localheinz/fix/new-line
Browse files Browse the repository at this point in the history
Fix: Output diff without extra new lines
  • Loading branch information
localheinz committed Feb 18, 2018
2 parents 13b6873 + 793ef4a commit fde9587
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/Command/NormalizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,13 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
'<fg=yellow>---------- begin diff ----------</>',
]);

$io->write($this->diff(
$json,
$formatted
));
$io->write(
$this->diff(
$json,
$formatted
),
false
);

$io->write('<fg=yellow>----------- end diff -----------</>');

Expand Down
5 changes: 4 additions & 1 deletion test/Unit/Command/NormalizeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,10 @@ public function testExecuteWithDryRunFailsIfLockerIsNotLockedAndComposerFileWasN
->shouldBeCalled();

$io
->write(Argument::type('array'))
->write(
Argument::type('array'),
Argument::is(false)
)
->shouldBeCalled();

$io
Expand Down

0 comments on commit fde9587

Please sign in to comment.