Skip to content

Commit a0e0bf5

Browse files
committed
better approach than a new env variable
1 parent 4e10cf0 commit a0e0bf5

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

tests/tools_tests/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ done
1919
# Test format-docstrings command
2020
for file in src/docstrings-format/*.{res,resi}; do
2121
output="src/expected/$(basename $file).expected"
22-
DISABLE_COLOR=true ../../_build/install/default/bin/rescript-tools format-docstrings "$file" --stdout > $output
22+
../../_build/install/default/bin/rescript-tools format-docstrings "$file" --stdout > $output
2323
# # CI. We use LF, and the CI OCaml fork prints CRLF. Convert.
2424
if [ "$RUNNER_OS" == "Windows" ]; then
2525
perl -pi -e 's/\r\n/\n/g' -- $output

tools/bin/main.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,10 @@ let main () =
5454
logAndExit (Tools.extractDocs ~entryPointFile:path ~debug:false)
5555
| _ -> logAndExit (Error docHelp))
5656
| "format-docstrings" :: rest -> (
57-
(try
58-
match Sys.getenv "DISABLE_COLOR" with
59-
| "true" -> Clflags.color := Some Misc.Color.Never
60-
| _ -> ()
61-
with Not_found -> ());
6257
match rest with
6358
| ["-h"] | ["--help"] -> logAndExit (Ok formatDocstringsHelp)
6459
| [path; "--stdout"] -> (
60+
Clflags.color := Some Misc.Color.Never;
6561
match
6662
Tools.FormatDocstrings.formatDocstrings ~outputMode:`Stdout
6763
~entryPointFile:path

0 commit comments

Comments
 (0)