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

fix '$env:TEMP' path resolving issue #53

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

Conversation

GreatTeacherBasshead
Copy link

$env:TEMP can be resolved to DOS-style path like 'C:\Users\ARZZ~1.BOK\AppData\Local\Temp', and then after Join-Path the resulting literal path is invalid.
If you Test-Path $script:location_modules, you get false in this case.
It causes that remove-item in line 334 fails the installation.

'$env:TEMP' can be resolved to DOS-style path, and then after 'Join-Path' the resulting literal path is invalid
@cwilhit
Copy link
Contributor

cwilhit commented Mar 20, 2019

I am unable to repro this. I tested by joining a DOS-style path with another path, and Test-Path is able to correctly detect whether the path exists or not.

@GreatTeacherBasshead
Copy link
Author

Ok... My bad. Test-Path works, but Remove-Item does not:
docker_module_error

@cwilhit
Copy link
Contributor

cwilhit commented Mar 22, 2019

What version of Windows and PowerShell are you using? I can't get this to repro (follwed the instructions above).

@GreatTeacherBasshead
Copy link
Author

I have it both on Windows Server 2016 and 2019.
Windows PowerShell 5.1

I think the problem is in the user name. Try to test it for a user, who has a dot in the name, like I showed.

@shoddyguard
Copy link

FYI I'm experiencing the $env:TEMP bug as noted in #71
I believe @GreatTeacherBasshead is correct as my user account also has a . in it.

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.

3 participants