chore: Added a little dev script to help contributors#4793
chore: Added a little dev script to help contributors#4793jamescrosswell wants to merge 10 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4793 +/- ##
==========================================
+ Coverage 73.94% 74.02% +0.07%
==========================================
Files 499 499
Lines 18026 18049 +23
Branches 3529 3512 -17
==========================================
+ Hits 13330 13361 +31
+ Misses 3832 3831 -1
+ Partials 864 857 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| Arguments = command, | ||
| UseShellExecute = false, | ||
| CreateNoWindow = true, | ||
| }; |
There was a problem hiding this comment.
which output leaks to console during availability check
Low Severity
IsCommandAvailableAsync creates a ProcessStartInfo without setting RedirectStandardOutput or RedirectStandardError to true. Since these default to false with UseShellExecute = false, the which command output (e.g., /usr/bin/sudo) is printed to the user's console. For a silent availability check, stdout and stderr need to be redirected to suppress this noise.
| if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) | ||
| { | ||
| return await Task.FromResult(true); | ||
| } |
There was a problem hiding this comment.
IsCommandAvailableAsync unconditionally returns true on Windows
Low Severity
IsCommandAvailableAsync always returns true on Windows regardless of the command passed in. The Windows branch is currently dead code (the only caller, WorkloadRestoreAsync, already returns early on Windows), but the method's contract—checking whether a command is available—is violated. If this utility method is reused for any other command on Windows, it will incorrectly report availability. Windows has where.exe as the equivalent of which, which could be used instead.


This emulates various commands that I have in my .zshrc file that I use frequently when working with the repo. Over time we could potentially expand on these (for example, it would be great to add one that ran various regexes on the logs output by integration/device tests, to identify errors/problems... currently we have to do this manually).
#skip-changelog