On Ubuntu 22.04, I also had issues running aftman self-install without sudo. Without running as sudo I get this error:
./aftman self-install
[INFO aftman::tool_storage] Updating all Aftman binaries...
[INFO aftman::tool_storage] Updated Aftman binaries successfully!
[ERROR aftman::system_path::unix] Error trying to write /home/overhash/.zshenv: failed to open file `/home/overhash/.zshenv`
What's more interesting is that when I do use sudo ./aftman self-install, it still won't update the zshenv. I had to manually move my .zshenv to a new file and then run aftman self-install (which created a fresh ~/.zshenv) before I merged my old changes in.
Most interestingly, all files are chmod 644. Running aftman self-install again after installing still causes the issue. I'm suspecting there's something funny going on here when actually reading the file.
Running off 652c4dfa230acf38cb77d94893c3001772822e8c.
I encountered this helping someone as well I believe. I think I found the fix for it already and completely forgot. I'll see about opening a pull request for it later.
Following from the discussion on #28:
On Ubuntu 22.04, I also had issues running
aftman self-install
without sudo. Without running as sudo I get this error:What's more interesting is that when I do use
sudo ./aftman self-install
, it still won't update thezshenv
. I had to manually move my.zshenv
to a new file and then runaftman self-install
(which created a fresh~/.zshenv
) before I merged my old changes in.Most interestingly, all files are
chmod 644
. Runningaftman self-install
again after installing still causes the issue. I'm suspecting there's something funny going on here when actually reading the file.Running off 652c4dfa230acf38cb77d94893c3001772822e8c.