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

Updates to DSC_CONFIG_ROOT env var #342

Merged
merged 9 commits into from Mar 6, 2024
Merged

Conversation

anmenaga
Copy link
Collaborator

@anmenaga anmenaga commented Mar 4, 2024

PR Summary

Fix #317 , #335

PR Context

Updates:

  1. Renamed env var to be DSC_CONFIG_ROOT
  2. Added a warning if DSC_CONFIG_ROOT env var already exists by the time it is overwritten by dsc.exe
  3. Path in DSC_CONFIG_ROOT env var is now always absolutized
  4. The dsc.exe --path parameter value is now always absolutized

Before change:

PS C:\DSCv3> dsc -l debug config get --path .\..\D1/test_config.dsc.yaml
2024-03-04T20:46:30.706571Z DEBUG dsc: 36: Running dsc 3.0.0-alpha.6
2024-03-04T20:46:30.706935Z DEBUG dsc::util: 419: Setting 'DSCConfigRoot' env var as '.\..\D1'
2024-03-04T20:46:30.707272Z DEBUG dsc::util: 379: Reading input from file .\..\D1/test_config.dsc.yaml

After change:

PS C:\DSCv3> dsc -l debug config get --path .\..\D1/test_config.dsc.yaml
2024-03-04T20:35:11.929049Z DEBUG dsc: 36: Running dsc 3.0.0-alpha.6
2024-03-04T20:35:11.929408Z DEBUG dsc::util: 436: Setting 'DSC_CONFIG_ROOT' env var as 'C:\D1'
2024-03-04T20:35:11.929742Z DEBUG dsc::util: 380: Reading input from file C:\D1\test_config.dsc.yaml

dsc/src/subcommand.rs Outdated Show resolved Hide resolved
dsc/src/util.rs Outdated Show resolved Hide resolved
dsc/src/util.rs Outdated Show resolved Hide resolved
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Mar 6, 2024
Merged via the queue into PowerShell:main with commit bd47bff Mar 6, 2024
4 checks passed
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.

DSCConfigRoot should be absolute and not relative
2 participants