moonrepo / proto

A pluggable multi-language version manager.
https://moonrepo.dev/proto
MIT License
677 stars 34 forks source link

Proto re-install failure #582

Closed W1M0R closed 2 months ago

W1M0R commented 2 months ago

What version?

0.39.7

Which command?

irm https://moonrepo.dev/install/proto.ps1 | iex

What happened?

The following command failed with an error:

> $Env:PROTO_NO_MODIFY_PROFILE="true"
> $Env:PROTO_NO_MODIFY_PATH="true"
> irm https://moonrepo.dev/install/proto.ps1 | iex
Write-Error: Failed to create file 'C:\Users\user2\.proto\temp\proto\proto_cli-x86_64-pc-windows-msvc\CHANGELOG.md' while expanding
the archive file 'C:\Users\user2\.proto\temp\proto\proto_cli-x86_64-pc-windows-msvc.zip' contents as the file
'C:\Users\user2\.proto\temp\proto\proto_cli-x86_64-pc-windows-msvc\CHANGELOG.md' already exists. Use the -Force
parameter if you want to overwrite the existing directory
'C:\Users\user2\.proto\temp\proto\proto_cli-x86_64-pc-windows-msvc\CHANGELOG.md' contents when expanding the archive
file.
> rd 'C:\Users\user2\.proto\temp\proto\proto_cli-x86_64-pc-windows-msvc' -recurse -force
> irm https://moonrepo.dev/install/proto.ps1 | iex
Finishing proto installation...
Successfully installed proto to ~\.proto\bin\proto.exe!
> irm https://moonrepo.dev/install/proto.ps1 | iex
Finishing proto installation...
Successfully installed proto to ~\.proto\bin\proto.exe!

This shows that the initial re-install failed, and required that I manually delete the ~\.proto\temp\proto\proto_cli-x86_64-pc-windows-msvc folder, and thereafter multiple re-install's succeeded.

Trace logs?

No response

Operating system?

Windows

Architecture?

x64

milesj commented 2 months ago

I think this was caused by your failed proto upgrade, because the upgrade removes that directory once upgraded.

W1M0R commented 2 months ago

Thanks for clarifying. That makes sense. It happened a few times again, but it is probably related to what you are saying. Feel free to close the issue.

milesj commented 2 months ago

I'll leave this open for a bit just in case someone else runs into it.