Skip to content

Commit e4fdcb7

Browse files
Fix: Change command option keep-outdated to remove-outdated to be a boolean.
1 parent 4662c8a commit e4fdcb7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Compare `.env-target` with `.env.example` and add missing variables to `.env-tar
3333
php ./vendor/bin/env-diff actualize .env.example .env-target
3434
```
3535

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

3838
```
39-
php ./vendor/bin/env-diff actualize -k=false
39+
php ./vendor/bin/env-diff actualize -r
4040
```
4141

4242
### Show differences

src/Console/Command/AbstractCommand.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected function configure()
2121
$this
2222
->addArgument('dist', InputOption::VALUE_REQUIRED, 'From file', Config::DEFAULT_DIST)
2323
->addArgument('target', InputOption::VALUE_REQUIRED, 'To file', Config::DEFAULT_TARGET)
24-
->addOption('keep-outdated', 'k', InputOption::VALUE_OPTIONAL, 'Keep old env variables', true);
24+
->addOption('remove-outdated', 'r', InputOption::VALUE_NONE, 'Remove old env variables', false);
2525
}
2626

2727
/**
@@ -48,11 +48,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
4848
*/
4949
private function createConfig(InputInterface $input)
5050
{
51-
$dist = $input->getArgument('dist');
52-
$target = $input->getArgument('target');
53-
$keepOutdated = $input->getOption('keep-outdated');
51+
$dist = $input->getArgument('dist');
52+
$target = $input->getArgument('target');
53+
$removeOutdated = $input->getOption('remove-outdated');
5454

55-
return new Config($dist, $target, $keepOutdated);
55+
return new Config($dist, $target, !$removeOutdated);
5656
}
5757

5858
/**

0 commit comments

Comments
 (0)