Skip to content

Commit

Permalink
Turn on newline experiment by default (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo authored Nov 2, 2023
1 parent 5a620f8 commit df0adb5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df0adb5

Please sign in to comment.