Skip to content

fix: support latest Windows and macOS runners#553

Merged
ueokande merged 5 commits into
masterfrom
dont-use-wmic
Apr 29, 2026
Merged

fix: support latest Windows and macOS runners#553
ueokande merged 5 commits into
masterfrom
dont-use-wmic

Conversation

@ueokande
Copy link
Copy Markdown
Member

@ueokande ueokande commented Apr 29, 2026

Problem

This PR fixes two compatibility issues with the latest CI runners:

Windows (latest runner)

wmic is deprecated and removed from Windows 11 / the latest Windows runner. The action used wmic to retrieve the installed Edge version, causing failures on the latest Windows runner.

macOS (latest runner, macOS 15 arm64)

On macOS 15 (arm64), the action failed with exit code null when running Microsoft Edge --version from the tool cache.

tc.cacheDir() uses copySourceDirectory: false, which copies the contents of the source directory into the cache root, stripping the .app directory name. The cached binary ended up at:

hostedtoolcache/msedge/stable/arm64/Contents/MacOS/Microsoft Edge

The Edge launcher locates its bundle root two levels up, finding arm64/ which has no .app extension. On macOS 15, Edge validates the bundle path and exits immediately with a signal kill (null exit code, empty stderr).

Fix

Windows

Replace wmic with Get-Item (PowerShell) to retrieve the installed Edge version.

macOS

Wrap the .app bundle in a wrapper/ subdirectory before calling tc.cacheDir(), so the .app name is preserved in the cache:

hostedtoolcache/msedge/stable/arm64/Microsoft Edge.app/Contents/MacOS/Microsoft Edge

Also updated binPath() to include the .app/Contents/MacOS/ path components.

Verification

All CI jobs pass on macOS (stable, beta, dev, canary), Windows, and Ubuntu.

ueokande and others added 5 commits April 29, 2026 14:18
- Log extracted pkg directory tree (3 levels) after xar -xf
- Check codesign, xattr, and spctl on app before caching
- Log cached binary path and existence after tc.cacheDir
- Capture stdout/stderr/exitCode in test() for diagnosis

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tc.cacheDir copies the *contents* of the source directory into the
cache root (copySourceDirectory: false), stripping the .app name.
The cached binary ends up at:
  hostedtoolcache/msedge/stable/arm64/Contents/MacOS/Microsoft Edge

The Edge binary looks for its bundle root two levels up, finding
'arm64/' which has no .app extension. On macOS 15, Edge validates
the bundle path and exits immediately (null exit code).

Fix: wrap the .app in a plain directory before caching so the .app
name is preserved in the cache:
  hostedtoolcache/msedge/stable/arm64/Microsoft Edge.app/Contents/MacOS/Microsoft Edge

Update binPath to include the .app directory name accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ueokande ueokande changed the title fix: preserve .app bundle name in tool cache on macOS fix: support latest Windows and macOS runners Apr 29, 2026
@ueokande ueokande merged commit 90ed50f into master Apr 29, 2026
8 checks passed
@ueokande ueokande deleted the dont-use-wmic branch April 29, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant