Skip to content

Commit 18538a1

Browse files
authored
fix(highlight): parsing of JUSTEST_DISABLE_SOURCE_HIGHLIGHT is wrong (#23)
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.
1 parent 0936ebf commit 18538a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

location.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func init() {
155155
if val, err := strconv.ParseBool(highlightEnv); err != nil {
156156
panic(fmt.Sprintf("Error parsing JUSTEST_HIGHLIGHT_SOURCE environment variable - illegal value: %s", highlightEnv))
157157
} else {
158-
highlight = val
158+
highlight = !val
159159
}
160160
}
161161

0 commit comments

Comments
 (0)