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

Remove Item Error after computer startup #298

Closed
JimAmuro opened this issue Aug 7, 2016 · 2 comments
Closed

Remove Item Error after computer startup #298

JimAmuro opened this issue Aug 7, 2016 · 2 comments

Comments

@JimAmuro
Copy link
Contributor

JimAmuro commented Aug 7, 2016

Hi, I have just installed posh-git. But everytime when I start powershell the first time after computer startup it shows 2 error message.

Remove-Item : An object at the specified path C:\Users\HUISUN~1 does not exist.
At C:\Users\Hui Sun\Documents\WindowsPowerShell\Modules\posh-git\GitUtils.ps1:242 char:13
+             Remove-Item $path
+             ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Remove-Item], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.RemoveItemCommand

Remove-Item : An object at the specified path C:\Users\HUISUN~1 does not exist.
At C:\Users\Hui Sun\Documents\WindowsPowerShell\Modules\posh-git\GitUtils.ps1:242 char:13
+             Remove-Item $path
+             ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Remove-Item], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.RemoveItemCommand

I have no idea about what is going on and how to fix it. My system is Windows 10 Redstone.

@JimAmuro
Copy link
Contributor Author

I think it has something to do with the tilde in the path. I decide to just delete that line of code...

@JimAmuro
Copy link
Contributor Author

I solved this. It is the ~ thing problem. Using $env:path shall give an 8.3 filename, which cannot be properly interpreted in Powershell. One needs to get full path from it and use the full path. I'll commit my revision.

dahlbyk added a commit that referenced this issue Aug 14, 2016
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

No branches or pull requests

1 participant