Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for DSC_RESOURCE_PATH #176

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

SteveL-MSFT
Copy link
Member

PR Summary

If DSC_RESOURCE_PATH env var exists, we use that instead of PATH for resource discovery.

PR Context

Fix #133

@michaeltlombardi
Copy link
Collaborator

@SteveL-MSFT - so, to clarify, the only way to set this is to do either:

DSC_RESOURCE_PATH=/usr/mikey/resources dsc resource list

or

$env:DSC_RESOURCE_PATH = 'C:\Users\Mikey\resources'
dsc resource list

but not:

dsc --resource_path /usr/mikey/resources resource list

or

$ResourcePaths = @(
  'C:\Users\Mikey\resources',
  'C:\dsc_resources'
) -join ';'
dsc resource list --resource_path $ResourcePaths

This is an environment variable only override, not an optional argument?

Copy link
Collaborator

@anmenaga anmenaga left a comment

Choose a reason for hiding this comment

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

LGTM

@SteveL-MSFT
Copy link
Member Author

This is an environment variable only override, not an optional argument?

@michaeltlombardi Correct, this is by env var only

@SteveL-MSFT SteveL-MSFT merged commit 5981176 into PowerShell:main Aug 30, 2023
4 checks passed
@SteveL-MSFT SteveL-MSFT deleted the dsc_resource_path branch August 30, 2023 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide ability to define dsc-v3 resource path (Support sxs installation)
3 participants