fix: runner PATH for Homebrew tools - #73
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughIntroduces ChangesRunnerEnvironment utility and integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🎉 This PR is included in version 1.17.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Fixes MacRunner-launched GitHub Actions runners missing Homebrew tools such as
npmwhen the MacRunner app is launched by LaunchServices or as a login item.Root Cause
The MacRunner GUI process inherits launchd's limited PATH, e.g.
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin. That environment is then passed into runner startup/configuration, and the Actions runner snapshots it into.path. On Apple Silicon Macs, Homebrew installs Node/npm under/opt/homebrew/bin, so actions that shell out tonpmfail even thoughnpmis available in the user's interactive shell.Changes
RunnerEnvironmentto normalize runner PATH values with standard Homebrew locations..pathsnapshot on start so existing runners recover after restart..pathwriting.Verification
git diff --checkswiftc -typecheck -target arm64-apple-macosx15.0 Sources/Services/RunnerEnvironment.swiftswift testwas attempted, but the current checkout fails on pre-existing issues unrelated to this change: SwiftUI#Previewmacro plugin missing forMenuBarView.swiftand Swift 6 actor-send errors inRunnerManager.swiftcontainer service calls.Summary by CodeRabbit
New Features
Tests