toolbox icon indicating copy to clipboard operation
toolbox copied to clipboard

toolbox can't source path

Open tazihad opened this issue 1 year ago • 2 comments

Describe the bug If a path is source from /home/linuxbrew in zsh. Toolbox failed to source it. Even though host system can.

Steps how to reproduce the behaviour

  1. Install linuxbrew on Fedora Atomic.
  2. By default brew installed in /home/linuxbrew location.
  3. add eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" in ~/.zsh.
  4. source ~/.zshrc
  5. Try to enter toolbox. toolbox enter
  6. toolbox fails to source path and gives error
/home/username22/.zshrc:25: no such file or directory: /home/linuxbrew/.linuxbrew/bin/brew

Expected behaviour toolbox container should be able to source path

Actual behaviour toolbox can't source the path and throws a error.

Output of toolbox --version (v0.0.90+) toolbox version 0.0.99.5

Toolbx package info (rpm -q toolbox) toolbox-0.0.99.5-11.fc40.x86_64

Output of podman version

Client:       Podman Engine
Version:      5.1.1
API Version:  5.1.1
Go Version:   go1.22.3
Built:        Tue Jun  4 06:00:00 2024
OS/Arch:      linux/amd64

Podman package info (rpm -q podman) podman-5.1.1-1.fc40.x86_64

Info about your OS Fedora Kinoite 40

tazihad avatar Jul 13 '24 22:07 tazihad

@tazihad Have you figured out a work-around for this? I've ended up doing the following in my zshrc:

source /etc/os-release

if [ "$VARIANT_ID" = "toolbx" ]; then
  if [ ! -L /home/linuxbrew ]; then
    sudo ln -s /run/host/home/linuxbrew /home/linuxbrew
  fi
fi

# Linux Brew System
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)

Not ideal but it seems to work.

rmb938 avatar Jul 27 '24 15:07 rmb938

@rmb938 thanks. work around works. I stopped using zsh in toolbox. And didn't source brew in bash.

tazihad avatar Jul 27 '24 17:07 tazihad