canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.52k stars 631 forks source link

aliases not working #3472

Closed minhio closed 2 months ago

minhio commented 3 months ago

Describe the bug I got a new MacBook Air M3 (old laptop was MacBook Pro M1), installed the latest version of multipass (1.13.1+mac), and aliases doesn't seems to be working anymore. I don't remember needing to add anything to PATH on my previous installations to get aliases to work. And I can't seems to find any documentations on where aliases are stored (at least not for Mac) so that I can add that to PATH manually

To Reproduce How, and what happened?

  1. brew install --cask multipass
  2. multipass launch docker
  3. docker -> zsh: command not found: docker

Expected behavior What did you expect to happen? the docker alias to work without needing to manually add aliases directory to PATH

Logs N/A

Additional info

luis4a0 commented 3 months ago

Hi @minhio, thanks for reporting. I think your issue is related to this. No alias message was shown, It was fixed and will be released in the next version of Multipass. What happened is that the message was never displayed and you didn't set the $PATH. Basically, the message would be this:

You'll need to add this to your shell configuration (.bashrc, .zshrc or so) for
aliases to work without prefixing with multipass:

PATH="$PATH:/Users/<yourusername>/Library/Application Support/multipass/bin"

So, you must set the path and aliases will work. Please confirm this solves your issue so I can close the ticket. Thanks!

minhio commented 2 months ago

Hi @minhio, thanks for reporting. I think your issue is related to this. No alias message was shown, It was fixed and will be released in the next version of Multipass. What happened is that the message was never displayed and you didn't set the $PATH. Basically, the message would be this:

You'll need to add this to your shell configuration (.bashrc, .zshrc or so) for
aliases to work without prefixing with multipass:

PATH="$PATH:/Users/<yourusername>/Library/Application Support/multipass/bin"

So, you must set the path and aliases will work. Please confirm this solves your issue so I can close the ticket. Thanks!

ahh gotcha, that was it, thank you

svandenhoek commented 2 months ago

Ran into the same issue (though indeed also got it fixed). Any chance the docs (on https://multipass.run/docs/using-aliases#heading--macos) will be updated to include the specific path?