Emit warning if executable in resource manifest can't be found#688
Merged
SteveL-MSFT merged 4 commits intoPowerShell:mainfrom Mar 14, 2025
Merged
Emit warning if executable in resource manifest can't be found#688SteveL-MSFT merged 4 commits intoPowerShell:mainfrom
SteveL-MSFT merged 4 commits intoPowerShell:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances resource discovery by validating that executables specified in the resource manifest are available, emitting a warning if they're not found.
- Added a new function (verify_executable) to check executable presence for various operations.
- Updated Cargo.toml to include the which dependency.
- Updated locale files with a new warning message for missing executables.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dsc_lib/src/discovery/command_discovery.rs | Added executable validation via verify_executable for each resource operation and integrated SchemaKind handling |
| dsc_lib/Cargo.toml | Added the which dependency to support executable lookup |
| dsc_lib/locales/en-us.toml | Added a new locale message 'executableNotFound' for warning messages |
Comments suppressed due to low confidence (1)
dsc_lib/src/discovery/command_discovery.rs:592
- Consider adding unit tests for 'verify_executable' to ensure that the warning is correctly emitted when an executable is not found.
fn verify_executable(resource: &str, operation: &str, executable: &str) {
tgauth
reviewed
Mar 14, 2025
8054fef to
57f0501
Compare
tgauth
reviewed
Mar 14, 2025
Co-authored-by: Tess Gauthier <tgauth@bu.edu>
tgauth
approved these changes
Mar 14, 2025
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.
PR Summary
getis always supported