[Error] bash: -- : invalid option with archlinux image on nixos
- Dominant language
- Go
- Stars
- 13k
- Forks
- 541
- Avg merge
- 20h 47m
- Merged PRs (30d)
- 4
Description
**Describe the bug**
When entering an `--init` container (using systemd as PID 1), `distrobox enter` and `distrobox upgrade` both fail immediately with:
```
bash: -- : invalid option
Usage: bash [GNU long option] [option] ...
```
I fix that with
```
home.packages = [
(pkgs.distrobox.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
substituteInPlace $out/bin/distrobox-enter \
--replace-fail 'set -- "--pty" "$@"' ':'
'';
}))
];
```
**To Reproduce**
1. Create an init container using Arch Linux:
```
distrobox create --init --image docker.io/archlinux:latest --name testinit
```
2. Try to enter it:
```
distrobox enter testinit
```
**Desktop**
- Container manager: **Docker**
- Docker version: `docker version` → 27.x
- Distrobox version: **1.8.2.4**
- Host distribution: **NixOS** (unstable)
- Distrobox installed via: **nixpkgs** (home-manager)
- Container image: `docker.io/archlinux:latest`
Contributor guide
Assessment
This issue has not been assessed yet.