Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upImplementing paths #6181
Conversation
This comment has been minimized.
This comment has been minimized.
|
This seems to overcomplicate things to me. Why would we not use environment variables that are in PowerShell? These all work the same on any OS? |
This comment has been minimized.
This comment has been minimized.
|
The paths should work on all relevant OSes. |
This comment has been minimized.
This comment has been minimized.
|
This needs to be added to the list of things to document for contributors if we implement it. Otherwise we will see folks just use env on the code changes. |
This comment has been minimized.
This comment has been minimized.
|
Probably even better to include tests to catch "unauthorized" $env: usage. |
This comment has been minimized.
This comment has been minimized.
|
agreed, that'd be great. one thing tho is that we have to ensure that we can still use $env within a Scriptblock in Invoke-Command/2 since the dbatools command will not be available remotely. |
This comment has been minimized.
This comment has been minimized.
|
Need to add |
This comment has been minimized.
This comment has been minimized.
|
heck yah, these are failures i can fix |
This comment has been minimized.
This comment has been minimized.
|
fake failure |
1f4f89f
into
development
FriedrichWeinmann commentedNov 5, 2019
Type of Change
Purpose
These new commands introduce better path resolution for common paths usually covered under environment variables ($env:temp, $env:AppData, $env:LocalAppdata, $env:ProgramData). They should find viable paths cross-platforms.
They also allow redirecting those paths at the user's convenience. For example when the default paths are unsuitable due to permissions reasons.
At the same time, they are a foundation to be able to easily create more, named paths utilizing the same tools.
Notes