enhance Executable function to handle relative paths#537
enhance Executable function to handle relative paths#537creativeprojects merged 2 commits intomasterfrom
Conversation
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant TestExecutable as TestExecutable (test)
participant HelperBinary as executable_test_helper
participant UtilPkg as util.Executable()
TestExecutable->>HelperBinary: Execute via absolute/relative/PATH
HelperBinary->>UtilPkg: Call Executable()
UtilPkg->>UtilPkg: Resolve path (relative, PATH, etc.)
UtilPkg-->>HelperBinary: Return resolved path
HelperBinary-->>TestExecutable: Output resolved path
TestExecutable->>TestExecutable: Assert correctness
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (7)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #537 +/- ##
==========================================
+ Coverage 79.27% 79.33% +0.06%
==========================================
Files 136 136
Lines 13295 13305 +10
==========================================
+ Hits 10539 10555 +16
+ Misses 2337 2332 -5
+ Partials 419 418 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



Enhance Executable function to handle relative paths and symlinks
This PR refactors the
Executable()function in executable_linux.go to properly handle different types of executable paths:Changes
.: Resolved using current working directoryexec.LookPath()to find absolute pathTesting
Impact
This enhancement ensures the
Executable()function returns consistent absolute paths regardless of how the binary was invoked, improving reliability when determining the current executable's location.Fixes finding executable code added for #490