Skip to content

Commit

Permalink
fix(highlight): parsing of JUSTEST_DISABLE_SOURCE_HIGHLIGHT is wrong
Browse files Browse the repository at this point in the history
This change fixes the parsing of the `JUSTEST_DISABLE_SOURCE_HIGHLIGHT`
environment variable. Now, setting `true`, `True`, `TRUE`, `1`, or `T`
will disable source code highlighting, as one would expect given the
environment variable's name.

Before this fix, only setting it to `false`, `False`, `FALSE`, `0` or
`F` would have turned off source code highlighting, which is the exact
opposite of the environment variable name.
  • Loading branch information
arikkfir committed Jun 23, 2024
1 parent 0936ebf commit a1b4777
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion location.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func init() {
if val, err := strconv.ParseBool(highlightEnv); err != nil {
panic(fmt.Sprintf("Error parsing JUSTEST_HIGHLIGHT_SOURCE environment variable - illegal value: %s", highlightEnv))
} else {
highlight = val
highlight = !val
}
}

Expand Down

0 comments on commit a1b4777

Please sign in to comment.