Skip to content

Commit

Permalink
Merge pull request #177 from localheinz/fix/dry-run
Browse files Browse the repository at this point in the history
Fix: Do not require composer.json to be writable when using --dry-run option
  • Loading branch information
localheinz authored May 23, 2019
2 parents c4062e2 + 2c3092e commit 367d861
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Unreleased

For a full diff see [`1.1.3...1.x`](https://github.com/localheinz/composer-normalize/compare/1.1.3...1.x).
For a full diff see [`1.1.4...1.x`](https://github.com/localheinz/composer-normalize/compare/1.1.4...1.x).

### [`1.1.4`](https://github.com/localheinz/composer-normalize/releases/tag/1.1.4)

For a full diff see [`1.1.3...1.1.4`](https://github.com/localheinz/composer-normalize/compare/1.1.3...1.1.4).

#### Fixed

* Removed requirement for `composer.json` to be writable when using the `--dry-run` option ([#177](https://github.com/localheinz/composer-normalize/pull/177)), by [@localheinz](https://github.com/localheinz)

### [`1.1.3`](https://github.com/localheinz/composer-normalize/releases/tag/1.1.3)

Expand Down
2 changes: 1 addition & 1 deletion src/Command/NormalizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
return 1;
}

if (!\is_writable($composerFile)) {
if (false === $input->getOption('dry-run') && !\is_writable($composerFile)) {
$io->writeError(\sprintf(
'<error>%s is not writable.</error>',
$composerFile
Expand Down

0 comments on commit 367d861

Please sign in to comment.