Repository navigation
Don't set process priority unless instructed to - #282
Merged
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #282 +/- ##
==========================================
- Coverage 95.38% 95.23% -0.16%
==========================================
Files 48 48
Lines 1193 1197 +4
Branches 86 86
==========================================
+ Hits 1138 1140 +2
- Misses 35 37 +2
Partials 20 20 ☔ View full report in Codecov by Sentry. |
Contributor
There was a problem hiding this comment.
PR Overview
This pull request ensures that process priority is only set when explicitly instructed, addressing issue #279. Key changes include:
- Rearranging the process startup sequence and error message construction in ProcessEx.cs.
- Adding a null check for ResourcePolicy.Priority and updating the exception message in Command.Execution.cs.
- Modifying ResourcePolicyBuilder.cs and ResourcePolicy.cs to support a nullable priority, preventing unintentional process priority settings.
Reviewed Changes
| File | Description |
|---|---|
| CliWrap/Utils/ProcessEx.cs | Moved start time recording and custom configuration post try-catch. |
| CliWrap/Command.Execution.cs | Added a null check for priority and updated the error message wording. |
| CliWrap/Builders/ResourcePolicyBuilder.cs | Updated priority type to nullable and adjusted setter accordingly. |
| CliWrap/ResourcePolicy.cs | Allowed a nullable priority by updating the default value and accessor. |
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
CliWrap/Command.Execution.cs:320
- [nitpick] Consider adding braces for the if-statement to improve clarity and reduce potential maintenance issues.
if (ResourcePolicy.Priority is not null)
Closed
4 of 5 tasks
hawkeye116477
pushed a commit
to hawkeye116477/CliWrap-net462
that referenced
this pull request
Jun 24, 2025
* Don't set process priority unless instructed to * Improve exception message
This was referenced Sep 11, 2025
This was referenced Oct 24, 2025
This was referenced Dec 21, 2025
This was referenced Apr 16, 2026
This was referenced Apr 30, 2026
This was referenced Jun 3, 2026
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #279