Skip to content

DSC_RESOURCE_PATH should be prefixed to PATH #814

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

Open
SteveL-MSFT opened this issue May 15, 2025 · 1 comment · May be fixed by #825
Open

DSC_RESOURCE_PATH should be prefixed to PATH #814

SteveL-MSFT opened this issue May 15, 2025 · 1 comment · May be fixed by #825
Labels
Issue-Enhancement The issue is a feature or idea Needs Triage Partner
Milestone

Comments

@SteveL-MSFT
Copy link
Member

Summary of the new feature / enhancement

Currently, users can set env var DSC_RESOURCE_PATH to override searching PATH for resource manifests. However, the executable found in the resource manifest still relies on PATH to find the exe.

Proposed technical implementation details (optional)

Seems like we should just prefix DSC_RESOURCE_PATH to PATH when it's defined so that resource manifest is still constrained to the user defined env var and searching for the exe prefers the user defined location.

@SteveL-MSFT SteveL-MSFT added Issue-Enhancement The issue is a feature or idea Needs Triage labels May 15, 2025
@SteveL-MSFT
Copy link
Member Author

While working on this, I think the intent of DSC_RESOURCE_PATH is to allow higher level tools to constrain the search path, but this should include search path for the executables and not just the resource manifests. As such, this means PATH should be overwritten with DSC_RESOURCE_PATH. However, a side effect of this is that any exe that then depends on another exe may not find it unless it's defined within DSC_RESOURCE_PATH. I think we might just need to document this and tooling that wants the prefix behavior should do that within DSC_RESOURCE_PATH. For example, in PowerShell:

$env:DSC_RESOURCE_PATH = "foo;bar;$env:PATH"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement The issue is a feature or idea Needs Triage Partner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant