Skip to content

fix: find the setup logs when Program Files isn't on C:, and print the latest Detail.txt - #351

Merged
dhensby merged 2 commits into
tediousjs:masterfrom
dhensby:fix/log-paths
Nov 21, 2026
Merged

dhensby merged 2 commits into
tediousjs:masterfrom
dhensby:fix/log-paths

Conversation

@dhensby

@dhensby dhensby commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

When setup fails, or in debug mode, the action prints SQL Server setup's Summary.txt and Detail.txt, and the instance's ERRORLOG files. This PR fixes two problems with how it finds them. Both mainly affect self-hosted runners.

  • Logs on another drive. The action searched only the literal path C:/Program Files/Microsoft SQL Server. Setup writes its logs under the Program Files directory, so on a runner whose Program Files directory is on another drive, a failed install printed no setup logs. The ERRORLOG files were still found through the instance's registry entry, but not through the fallback for an instance that isn't registered. The three glob patterns now start from the ProgramFiles environment variable, with C:\Program Files when it isn't set. Any glob characters in it are escaped.
  • The wrong Detail.txt. Setup writes each run's Detail.txt in a directory named after the run's start time, inside a directory for each SQL Server version. The action sorted the full paths and took the last one. The version directory comes first in the path, so the sort put the highest version last, even when its run was older. On a runner with logs from a later SQL Server version, a failed install printed that version's older Detail.txt. The action now sorts by the start time directory, and by the full path when two runs have the same start time.

Part of #331. The proxy and cache key items follow in separate PRs.

🤖 Generated with Claude Code

dhensby and others added 2 commits November 21, 2026 15:41
The action looked for Summary.txt, Detail.txt and the ERRORLOG files
only under the literal path C:/Program Files/Microsoft SQL Server. It
uses the ERRORLOG search only when the instance isn't in the registry.
Setup writes its logs in the Program Files directory, and installs the
instance there by default. On a runner whose Program Files directory
is on another drive, the action found none of these files.

Build the glob patterns from the ProgramFiles environment variable.
Use C:\Program Files when the variable isn't set, and escape any glob
characters in it and in the instance name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setup writes the Detail.txt of each run in a directory named after the
start time of the run. That directory is in a directory for each SQL
Server version. The action sorted the full paths and used the last
one. The version directory comes first in the path, so the sort put
the highest version last, even when its run was older. After a failed
install, or in debug mode, the action could print an old Detail.txt
of another version. Sort by the start time directory instead, and by
the full path when two runs have the same start time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhensby
dhensby marked this pull request as ready for review November 21, 2026 16:09
@dhensby
dhensby merged commit 3b60c58 into tediousjs:master Nov 21, 2026
24 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant