Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toolbox can't source path #1518

Open
tazihad opened this issue Jul 13, 2024 · 2 comments
Open

toolbox can't source path #1518

tazihad opened this issue Jul 13, 2024 · 2 comments
Labels
1. Bug Something isn't working

Comments

@tazihad
Copy link

tazihad commented Jul 13, 2024

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 tazihad added the 1. Bug Something isn't working label Jul 13, 2024
@rmb938
Copy link

rmb938 commented Jul 27, 2024

@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.

@tazihad
Copy link
Author

tazihad commented Jul 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants