Skip to content

Commit b86ca03

Browse files
committed
SWT_NO_FILE_IO guard is in the wrong place around configureAttachmentHandling().
1 parent 44b5378 commit b86ca03

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Testing/Attachments/Attachment.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,6 @@ extension Runner {
506506
/// attached" events and saves attachments where necessary.
507507
mutating func configureAttachmentHandling() {
508508
configuration.eventHandler = { [oldEventHandler = configuration.eventHandler] event, context in
509-
#if !SWT_NO_FILE_IO
510509
var event = copy event
511510
if case .valueAttached = event.kind {
512511
guard let configuration = context.configuration,
@@ -516,7 +515,6 @@ extension Runner {
516515
}
517516
}
518517
oldEventHandler(event, context)
519-
#endif
520518
}
521519
}
522520
}

Sources/Testing/Running/Runner.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,9 @@ extension Runner {
416416
private static func _run(_ runner: Self) async {
417417
var runner = runner
418418
runner.configureEventHandlerRuntimeState()
419+
#if !SWT_NO_FILE_IO
419420
runner.configureAttachmentHandling()
421+
#endif
420422

421423
// Track whether or not any issues were recorded across the entire run.
422424
let issueRecorded = Locked(rawValue: false)

0 commit comments

Comments
 (0)