89luca89 / 89luca89/distrobox

distrobox-enter: envs with `"` are not present in container

未關閉
#1,842 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug wait-on-user
主要語言
Go
星號
13k
分支
541
平均合併
20 小時 47 分鐘
30 天內合併 PR
4

描述

**Describe the bug**
If there's a `"` in an environment variable (e.g. a JSON string), `distrobox-enter` won't make it available in the container. Other envs are available.

**To Reproduce**
```bash
$ GOOD='yes' BAD='{"foo":1}' distrobox enter -- sh -c 'echo GOOD=$GOOD BAD=$BAD'
GOOD=yes BAD=
```

**Expected behavior**
All envs are available in the container.

I think `docker exec` supports only set env names and it will read the values: `--env=ENV`, not need to set env value in the command line `--env=ENV=value`. If we don't set the value, this filter can be removed:

https://github.com/89luca89/distrobox/blob/3f2ae51a32540434376ec8c43cb8636eb347e2a1/distrobox-enter#L439

**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):**

- Are you using podman, docker or lilipod?
- Which version or podman, docker or lilipod?
- Which version of distrobox?
- Which host distribution?
- How did you install distrobox?

**Additional context**
Add any other context about the problem here.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。