Skip to content

Commit 16e581a

Browse files
committed
Fix Environment.flag optional unwrapping in EntryPoint.swift
The Environment.flag(named:) function returns Bool? but was being used directly in an if statement. Changed to explicit comparison with true to handle the optional properly.
1 parent 7eb599a commit 16e581a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Testing/ABI/EntryPoints/EntryPoint.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func entryPoint(passing args: __CommandLineArguments_v0?, eventHandler: Event.Ha
5555
// Configure the event recorder to write events to stderr.
5656
if configuration.verbosity > .min {
5757
// Check for experimental console output flag
58-
if Environment.flag(named: "SWT_ENABLE_EXPERIMENTAL_CONSOLE_OUTPUT") {
58+
if Environment.flag(named: "SWT_ENABLE_EXPERIMENTAL_CONSOLE_OUTPUT") == true {
5959
// Use experimental AdvancedConsoleOutputRecorder
6060
var advancedOptions = Event.AdvancedConsoleOutputRecorder.Options()
6161
advancedOptions.base = .for(.stderr)

0 commit comments

Comments
 (0)