zef icon indicating copy to clipboard operation
zef copied to clipboard

zef does not chdir to shell after `zef look Foo`

Open melezhik opened this issue 3 weeks ago • 3 comments

root@9bd616413a89:/app# which raku
/usr/bin/raku
root@9bd616413a89:/app# raku -v
Welcome to Rakudo™ Star v2025.10.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2025.10.
root@9bd616413a89:/app# zef look Kind
===> Searching for: Kind
===> Shelling into directory: /tmp/.zef.1765538877.25989/5a1ea348fa4e0758a292771b655d312d39957aec.tar.gz/ra-Kind
Use of uninitialized value element of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
  in sub MAIN at /usr/share/perl6/site/sources/CAD0F1968DE67DEAA8C3D93E30E974539972F1B2 (Zef::CLI) line 922
root@9bd616413a89:/app# pwd
/app

melezhik avatar Dec 12 '25 11:12 melezhik

FWIW - I run this inside docker container with Debian

melezhik avatar Dec 12 '25 11:12 melezhik

With rakubrew rakudo, the same version it works

Julias-MacBook-Pro:brownie alex$ rakubrew switch moar-2025.10
Switching to moar-2025.10
Julias-MacBook-Pro:brownie alex$ raku -v
Welcome to Rakudo™ v2025.10.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2025.10.
Julias-MacBook-Pro:brownie alex$ zef look Kind
===> Searching for: Kind
===> Shelling into directory: /var/folders/8t/6007wd950wd44lktdkk7b_q00000gp/T/.zef.1765546305.55269/5a1ea348fa4e0758a292771b655d312d39957aec.tar.gz/ra-Kind

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ pwd
/private/var/folders/8t/6007wd950wd44lktdkk7b_q00000gp/T/.zef.1765546305.55269/5a1ea348fa4e0758a292771b655d312d39957aec.tar.gz/ra-Kind

melezhik avatar Dec 12 '25 13:12 melezhik

6:00 PM [Coke]: I still need to check I think it’s but a Rakudo star issue , it somehow relates to container environment. I see the same problem with whateverable Rakudo and Rakudo installed from source - if they run on container

melezhik avatar Dec 12 '25 15:12 melezhik

You need to have the environment variable e.g. $SHELL set to something so it knows what shell to spawn. zef should probably exit with an error stating that.

ugexe avatar Dec 12 '25 23:12 ugexe

You probably right

root@9bd616413a89:/app# export SHELL=/bin/bash
root@9bd616413a89:/app# zef look Kind
===> Searching for: Kind
===> Shelling into directory: /tmp/.zef.1765654159.76558/5a1ea348fa4e0758a292771b655d312d39957aec.tar.gz/ra-Kind
root@9bd616413a89:/tmp/.zef.1765654159.76558/5a1ea348fa4e0758a292771b655d312d39957aec.tar.gz/ra-Kind# pwd
/tmp/.zef.1765654159.76558/5a1ea348fa4e0758a292771b655d312d39957aec.tar.gz/ra-Kind

melezhik avatar Dec 13 '25 19:12 melezhik