You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--output pointing at a nonexistent directory fails late with a misleading error #446
The tool does all the parsing work, then fails at the very end when writing index.html:
An error has occured while creating the report
Error: The file "index.html" doesn't exist.
Exit code is 1. Neither line mentions the actual problem — that the output directory doesn't exist.
Details
Reproduces on Xcode 26.2 (local) and Xcode 26.6 (CI runners) — environment-independent.
The failure point is the html.write(toFile:) call in Sources/XCTestHTMLReport/XCTestHtmlReport.swift (run()): the thrown CocoaError surfaces as ArgumentParser's misleading "The file "index.html" doesn't exist." message, after all parsing/rendering work is already done.
This caused a false alarm in the first scheduled toolchain-drift run (Toolchain drift detected (Xcode 26.6 (17F113)) #444): the workflow passed an uncreated $RUNNER_TEMP subdirectory and the late, misleading error looked like toolchain drift.
Suggested fix (in the CLI)
Either create the output directory (FileManager.createDirectory(atPath:withIntermediateDirectories:)) before writing, or validate it up front in validate() and fail fast with a clear message ("output directory /some/missing/dir does not exist"). Failing late after minutes of parsing, with an error that points at the wrong file, is the bug regardless of which option is chosen.
The workflow-side workaround (mkdir before invoking) landed separately in #445; this issue tracks the product fix.
Activity
Ready the repo for the 4.0.0rc1 release candidate (#474)