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

(#2051) Make parameter description consistent #2208

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

gep13
Copy link
Member

@gep13 gep13 commented Mar 1, 2021

In an earlier commit, the default value of the WorkingDirectory
parameter was changed to be $null, but the parameter description wasn't
updated.

In an earlier commit, the default value of the WorkingDirectory
parameter was changed to be $null, but the parameter description wasn't
updated.
@gep13 gep13 requested a review from ferventcoder March 1, 2021 07:22
`Get-Location`. If current location is a UNC path, uses
`$env:TEMP` for default as of 0.10.14.
`$null`. If current location is a UNC path, uses `$env:TEMP` for default
as of 0.10.14.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If null is passed in, it will set it to Get-Location - that note needs to be addressed here me thinks?

Copy link
Member

@ferventcoder ferventcoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

questions on clarity of what we changed

ferventcoder referenced this pull request Mar 10, 2021
The previous commit 9e2e49a to address UNC paths broke the ability to
provide a working directory to the Start-ChocolateyProcessAsAdmin
helper function. The test `$workingDirectory.ProviderPath -eq $null`
always evaluates to true because the String type does not have the
member ProviderPath.

The fix is to obtain the location object only when no path is provided
to the helper and to verify its validity before use, possibly falling
back to the cache location, similar to how it was implemented for
Get-ChocolateyUnzip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants