tadzik / rakudobrew

Perl 6 installation manager
MIT License
185 stars 42 forks source link

switch doesn't work after the latest update #146

Closed vrurg closed 5 years ago

vrurg commented 5 years ago

With the latest update it builds the requested rakudo. But nothing happens upon switch to that version. It was used to install symlinks in ~/.rakudobrew/bin but not anymore. When I decided to recheck init instructions there was paths to the built rakudo version in the recommended PATH.

macOS, fish shell. Sorry, no time for better diagnostics.

patrickbkr commented 5 years ago

What you see is the new behavior of rakudobrew in env mode. In env mode rakudobrew doesn't rely on shims, but modifies the $PATH variable in place. For this to work you need to install the shell hook as instructed (see rakudobrew init).

If you want rakudobrew to use shims as it did in the previous version you have to change the mode to shim. use rakudobrew mode shim to do that. Also note, that the shims do not reside in ~/.rakudobrew/bin anymore but in ~/.rakudobrew/shims.

Please reopen if the above does not fully explain the behaviour you see.

vrurg commented 5 years ago

Just for a note. The hook was installed but something went wrong. I switched over to shims mode. This way it works. Almost. rakudobrew switch system doesn't work for me. I ignore this because for a long time is using own shortcut to switch off rakudobrew. :)

patrickbkr commented 5 years ago

@vrurg Can you tell what goes wrong with rakudobrew switch system? It doesn't remove the shims when switching to system (because they are still needed for local versions to work), but the shims should correctly forward to the system perl6. Also do you know what went wrong with the hook? I'd like to get this working in all environments...

vrurg commented 5 years ago

My rakudo is installed in ~/perl6. With rakudobrew switch system which perl6 is /Users/vrurg/.rakudobrew/shims/perl6 – as it expected to be. But perl6 -v ends up with:

/Users/vrurg/.rakudobrew/shims
/Users/vrurg/perl6/bin
Can't exec "/Users/vrurg/.rakudobrew/shims": Permission denied at /Users/vrurg/.rakudobrew/shims/perl6 line 567.
Executing /Users/vrurg/.rakudobrew/shims failed with: Permission denied at /Users/vrurg/.rakudobrew/shims/perl6 line 568.

UPD Did rakudo self-upgrade. Now it fails with:

/Users/vrurg/perl6/bin
Can't exec "/Users/vrurg/perl6/bin": Permission denied at /Users/vrurg/.rakudobrew/shims/perl6 line 578.
Executing /Users/vrurg/perl6/bin failed with: Permission denied at /Users/vrurg/.rakudobrew/shims/perl6 line 579.
patrickbkr commented 5 years ago

I'll look into this.

vrurg commented 5 years ago

What a coincidence! I self-upgrade'd rakudobrew a couple of minutes ago and can confirm that it's working now.

vrurg commented 5 years ago

Thanks a lot!