89luca89 / 89luca89/distrobox

[Error] distrobox-enter <command> and running the command after distrobox-enter having different results

オープン
#1,864 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Go
スター
13k
フォーク
541
平均マージ
20時間 47分
マージ済み PR(30日)
4

説明

**Describe the bug**
I have an exported bin, and when I run it using `distrobox-enter -- `, the host env's `PATH` is being picked up and used for that command. However, if I interactively enter the same distrobox and do the same command, the host env's `PATH` is not used.

```sh
distrobox-enter

```

My distrobox uses a different shell, and the binary doesn't exist on its `PATH`.

**To Reproduce**
You can reporoduce this by
1. make a new dir `~/some_dir`
2. add a bin
```sh
tee ~/some_dir/some_bin << EOF
#!/bin/sh
echo "hello world"
EOF
```
3. make it executable `chmod u+x ~/some_dir/some_bin`
4. add this to your path `export PATH=~/some_dir:$PATH`
5. give your distrobox a different shell (https://distrobox.it/useful_tips/#use-a-different-shell-than-the-host)
6. enter the distrobox and run it, it should not be found
```sh
distrobox-enter
some_bin
bash: some_bin: command not found
```
7. exit the distrobox and run it using `distrobox-enter`
```sh
$ distrobox-enter -- some_bin
hello world
```

**Expected behavior**
At step 7 above, it should have the same result as step 6
```
bash: some_bin: command not found
```

**Logs**
Run the commands with `--verbose` and post the log here as a file upload
Attach also the output of `podman logs` or `docker logs`, possibly with `--latest` flag

**Desktop (please complete the following information):**

podman version 5.6.2
distrobox: 1.8.1.2
fedora (silverblue) 42 / bluefin

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。