Closed W1M0R closed 1 month ago
Thanks for the report, it's very detailed! Much appreciated. It seems like theres a few things going on here:
gobin
setting should be false, so that's a bug. We made all options opt-in a while back but looks like we missed one.Come on github, closing an issue in another repo shouldn't close this one...
I'll update gobin in the next big release, since it's technically a breaking change.
Thank you very much for your time and effort to resolve this issue.
What version?
0.38.1
Which command?
proto use
What happened?
installation
.prototools
proto use
Microsoft.PowerShell_profile.ps1
What happens
When I open a new
pwsh
session, I am greeted with the following error:If I delete the lines added by
proto
fromMicrosoft.PowerShell_profile.ps1
, thenpwsh
works as expected.What should happen
Ideally, I don't want
proto use
to modify my profile at all, since I manage my ownGOBIN
andPATH
per project.I see that the go plugin can be configured to not inject
GOBIN
: https://github.com/moonrepo/go-plugin?tab=readme-ov-file#configuration. Adding the following lines to my.prototools
file solves the issue for me:Perhaps
proto use
can gain a--no-profile
flag to skip the profile update part. Tool plugins can be taught to respect that flag and then set their configuration automatically based on that, e.g.gobin=false
in the case of the go plugin.Alternatively,
proto use
can detect whetherGOBIN
is already set, and if so, not make any changes to the profile.For those that do prefer the profile to be updated, the current implementation must be corrected. The powershell syntax seems odd to me. The following version works as expected:
Related:
Trace logs?
This is quite long. Let me know if the issue is unclear, then I can paste it here.
Operating system?
Windows
Architecture?
x64