dbuild: pass --tty when running in interactive mode

podman does not allocate a tty by default, so without `-t` or `--tty`,
one cannot use a functional terminal when interacting with the
container. that what one can expect when running `dbuild -i --`, and
we are greeted with :

```
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
```

after this change, one can enjoy the good-old terminal as usual
after being dropped to the container provided by `dbuild -i --`.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#19550
This commit is contained in:
Kefu Chai
2024-06-29 23:22:59 +08:00
committed by Nadav Har'El
parent d034cde01f
commit 947e28146d

View File

@@ -224,7 +224,7 @@ if [[ -n "$interactive" || -n "$is_podman" ]]; then
# We also avoid detached mode with podman, which doesn't need it
# (it does not proxy SIGTERM) and doesn't work well with it.
$tool run --rm "${docker_common_args[@]}"
$tool run --tty --rm "${docker_common_args[@]}"
ret=$?
cleanup
exit $ret