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

(GH-2051) Fix: workingDirectory is always relpaced with the cache location #2006

Closed
wants to merge 1 commit into from
Closed

Conversation

ifreislich
Copy link

@ifreislich ifreislich commented Feb 24, 2020

The previous fix 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.

Closes #2051

The previous fix 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.
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.

LGTM!

@ferventcoder ferventcoder changed the title (GH-1781) fix: workingDirectory is always relpaced with the cache location (GH-2051) Fix: workingDirectory is always relpaced with the cache location May 16, 2020
@ferventcoder
Copy link
Member

Rebased and merged into stable at 8d78c0a. Thanks so much for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants