Skip to content

Commit df51e04

Browse files
authored
Merge pull request #61 from Dev380/dry-run
Document new `--dry-run` flag
2 parents b342c3b + 9ac6bbb commit df51e04

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

docs/usage/fix.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ Fixing .env
2626
All warnings are fixed. Total: 2
2727
```
2828

29+
#### Dry run
30+
31+
If you want to run `fix` without modifying any files on disk, use the `--dry-run` flag.
32+
33+
```bash
34+
$ dotenv-linter fix --dry-run
35+
Fixing .env
36+
Dry run - not changing any files on disk.
37+
38+
BAR=bar_example_one
39+
# BAR=bar_example_two
40+
FOO=foo_example
41+
42+
43+
.env:2 DuplicatedKey: The BAR key is duplicated
44+
.env:3 LowercaseKey: The foo key should be in uppercase
45+
46+
All warnings are fixed. Total: 2
47+
```
48+
2949
#### Addition arguments
3050

3151
In addition, the `fix` command supports the following list of arguments:

docs/whats_new/v331.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Here's an overview of the key changes included in this release.
66

77
PR: [#757](https://github.com/dotenv-linter/dotenv-linter/pull/757) ([@harryzcy](https://github.com/harryzcy))
88

9+
### 2. Add `--dry-run` option to the "fix" subcommand
10+
11+
PR: [#772](https://github.com/dotenv-linter/dotenv-linter/pull/772) ([@Dev380](https://github.com/Dev380))
12+
913
These are all the key changes that are included in the new [v3.3.1](https://github.com/dotenv-linter/dotenv-linter/releases/tag/v3.2.0) release.<br/>
1014
Thanks to everyone who contributed 🙏
1115

0 commit comments

Comments
 (0)