Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ Compare `.env-target` with `.env.example` and add missing variables to `.env-tar
php ./vendor/bin/env-diff actualize .env.example .env-target
```

If you want to delete outdated values just run command with `-k=false` option.
If you want to remove outdated values just run command with `-r` option.

```
php ./vendor/bin/env-diff actualize -k=false
php ./vendor/bin/env-diff actualize -r
```

### Show differences
Expand Down
10 changes: 5 additions & 5 deletions src/Console/Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function configure()
$this
->addArgument('dist', InputOption::VALUE_REQUIRED, 'From file', Config::DEFAULT_DIST)
->addArgument('target', InputOption::VALUE_REQUIRED, 'To file', Config::DEFAULT_TARGET)
->addOption('keep-outdated', 'k', InputOption::VALUE_OPTIONAL, 'Keep old env variables', true);
->addOption('remove-outdated', 'r', InputOption::VALUE_NONE, 'Remove old env variables');
}

/**
Expand All @@ -48,11 +48,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
*/
private function createConfig(InputInterface $input)
{
$dist = $input->getArgument('dist');
$target = $input->getArgument('target');
$keepOutdated = $input->getOption('keep-outdated');
$dist = $input->getArgument('dist');
$target = $input->getArgument('target');
$removeOutdated = $input->getOption('remove-outdated');

return new Config($dist, $target, $keepOutdated);
return new Config($dist, $target, !$removeOutdated);
}

/**
Expand Down