Skip to content

chore: Added a little dev script to help contributors#4793

Open
jamescrosswell wants to merge 10 commits intomainfrom
dev-scripts
Open

chore: Added a little dev script to help contributors#4793
jamescrosswell wants to merge 10 commits intomainfrom
dev-scripts

Conversation

@jamescrosswell
Copy link
Collaborator

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

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.02%. Comparing base (fd57a21) to head (64c0d53).
⚠️ Report is 3 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell jamescrosswell marked this pull request as ready for review December 8, 2025 09:05
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Arguments = command,
UseShellExecute = false,
CreateNoWindow = true,
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return await Task.FromResult(true);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

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