KEMBAR78
Add api to find unit processors based on search path by yao-msft · Pull Request #5386 · microsoft/winget-cli · GitHub
Skip to content

Conversation

yao-msft
Copy link
Contributor

@yao-msft yao-msft commented Apr 14, 2025

Added EnvironmentVariables customization support for ProcessExecution.
Added ProcessorRunSettings to customize each processor run settings. Currently only used to change path environment variables for processor runs.
Added support to find unit processors based on search path. If search paths not provided, the api will list all unit processors that can be found.

Added e2e tests.

Microsoft Reviewers: Open in CodeFlow

@yao-msft yao-msft requested a review from a team as a code owner April 14, 2025 21:27
Copy link
Member

@JohnMcPMS JohnMcPMS left a comment

Choose a reason for hiding this comment

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

While this code can find (and even execute) resources that are not on the configured PATH, we should not export any resource that isn't discoverable by a standard call to dsc.exe. If we do, the configuration won't work without special code to find them again on the apply-side.

}
else
{
AICLI_LOG(Config, Warning, << "Set Processor does not support FindUnitProcessors operation");
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this should be an error to indicate that the operation could not be performed. We already do similar with the GetAll* functions.

Copy link
Member

Choose a reason for hiding this comment

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

I meant that the API should produce an error.

else
{
AICLI_LOG(Config, Warning, << "Set Processor does not support FindUnitProcessors operation");
return winrt::single_threaded_vector<IConfigurationUnitProcessorDetails>();
Copy link
Member

Choose a reason for hiding this comment

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

Same error as ConfigurationProcessor.

@yao-msft yao-msft merged commit 248d4a0 into microsoft:master Apr 21, 2025
9 checks passed
@yao-msft yao-msft deleted the findprocessors branch April 21, 2025 19:11
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.

2 participants