mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 11:42:33 +00:00
make tests green on Unix
This commit is contained in:
@@ -647,7 +647,3 @@ proc listHints*(conf: ConfigRef) =
|
||||
if hint in conf.notes: "x" else: " ",
|
||||
configuration.HintsToStr[ord(hint) - ord(hintMin)]
|
||||
])
|
||||
|
||||
# enable colors by default on terminals
|
||||
#if terminal.isatty(stderr):
|
||||
# incl(gGlobalOptions, optUseColors)
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
import
|
||||
os, strutils, strtabs, osproc, sets, configuration, platform
|
||||
|
||||
from terminal import isatty
|
||||
|
||||
const
|
||||
hasTinyCBackend* = defined(tinyc)
|
||||
useEffectSystem* = true
|
||||
@@ -182,7 +184,7 @@ const
|
||||
optBoundsCheck, optOverflowCheck, optAssert, optWarns,
|
||||
optHints, optStackTrace, optLineTrace,
|
||||
optPatterns, optNilCheck, optMoveCheck}
|
||||
DefaultGlobalOptions* = {optThreadAnalysis, optUseColors}
|
||||
DefaultGlobalOptions* = {optThreadAnalysis}
|
||||
|
||||
template newPackageCache*(): untyped =
|
||||
newStringTable(when FileSystemCaseSensitive:
|
||||
@@ -221,6 +223,9 @@ proc newConfigRef*(): ConfigRef =
|
||||
implicitIncludes: @[], # modules that are to be implicitly included
|
||||
docSeeSrcUrl: ""
|
||||
)
|
||||
# enable colors by default on terminals
|
||||
if terminal.isatty(stderr):
|
||||
incl(result.globalOptions, optUseColors)
|
||||
|
||||
proc newPartialConfigRef*(): ConfigRef =
|
||||
## create a new ConfigRef that is only good enough for error reporting.
|
||||
|
||||
Reference in New Issue
Block a user