Skip to content

Conversation

@anmenaga
Copy link

@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

@anmenaga anmenaga requested review from SteveL-MSFT and tgauth March 4, 2024 20:48
@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
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