diff --git a/README.md b/README.md index 6bcd9bf73f..db17d62d1e 100644 --- a/README.md +++ b/README.md @@ -128,19 +128,6 @@ error code when entries are not pinned: ./ratchet check workflow.yml ``` -### CLI Options - -Use these options to configure the default behavior of Ratchet. - -#### Option - Experimental Keep Newlines - -Experimental functionality to enable keeping newlines in the output. Only -applies to cli commands that modify output. - -##### Usage - -Enable via environment variable `RATCHET_EXP_KEEP_NEWLINES=true`. - ## Examples #### CI/CD workflow @@ -256,5 +243,16 @@ only applies to the line on which it appears. - uses: 'actions/checkout@v${{ matrix.version }}' ``` +## Experiments + +Use these options to configure the default behavior of Ratchet. + +### Experiment: Keep Newlines + +Experimental functionality to enable keeping newlines in the output. This only +applies to cli commands that modify output. As of v0.5.0, this functionality is +enabled by default. To disable it, set the environment variable +`RATCHET_EXP_KEEP_NEWLINES=false`. + [containers]: https://github.com/sethvargo/ratchet/pkgs/container/ratchet [releases]: https://github.com/sethvargo/ratchet/releases diff --git a/command/command.go b/command/command.go index 63ec0002d4..c68c9d24c2 100644 --- a/command/command.go +++ b/command/command.go @@ -58,7 +58,7 @@ func Run(ctx context.Context, args []string) error { } func keepNewlinesEnv() bool { - value := false + value := true if v, ok := os.LookupEnv("RATCHET_EXP_KEEP_NEWLINES"); ok { if t, err := strconv.ParseBool(v); err == nil { value = t