Skip to content

add support for DSC_RESOURCE_PATH#176

Merged
SteveL-MSFT merged 2 commits intoPowerShell:mainfrom
SteveL-MSFT:dsc_resource_path
Aug 30, 2023
Merged

add support for DSC_RESOURCE_PATH#176
SteveL-MSFT merged 2 commits intoPowerShell:mainfrom
SteveL-MSFT:dsc_resource_path

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

@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 enabled auto-merge August 30, 2023 21:34
@SteveL-MSFT SteveL-MSFT disabled auto-merge August 30, 2023 22:00
@SteveL-MSFT SteveL-MSFT merged commit 5981176 into PowerShell:main Aug 30, 2023
@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