ugexe / zef

Raku Module Management
Artistic License 2.0
206 stars 44 forks source link

Failed to create directory '/usr/share/perl6/site/short' with mode '0o777': Failed to mkdir #514

Closed mimosinnet closed 1 year ago

mimosinnet commented 1 year ago

After updating to Rakudo v2023.02, I got this error when using zef:

$ zef info Failed to create directory '/usr/share/perl6/site/short' with mode '0o777': Failed to mkdir: Permission denied in sub MAIN at /home/mimosinnet/.raku/bin/zef line 3 in block at /home/mimosinnet/.raku/bin/zef line 1

Zef works again after creating the directories:

Another box with Rakudo v2022.06, without such directories, zef works fine.

ugexe commented 1 year ago

That error comes from rakudo itself, not zef. bin/zef tries to load Zef::CLI, and rakudo tries to look for that module. When it looks for that module, it creates any directories that should already exist but don't for whatever reason.

ugexe commented 1 year ago

see: https://github.com/rakudo/rakudo/blob/7b4b680e3e9a1b8c07549c9d8089211059c6cb52/src/core.c/CompUnit/Repository/Installation.pm6#L142