Ignore prompt if stdin not a tty on machine start

When starting a machine and the user has not explicitly passed
-u=true|false AND stdin is a not a tty, we should not prompt to update
connections.

Fixes: #27556

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2025-11-18 10:00:00 -06:00
parent 5c48d02fe8
commit 3d566d85cf
3 changed files with 22 additions and 12 deletions

View File

@@ -7,7 +7,8 @@
When used in conjunction with `podman machine init --now` or `podman machine start`, this option sets the
associated machine system connection as the default. When using this option, a `-u` or `-update-connection` will
set the value to true. To set this value to false, meaning no change and no prompting,
use `--update-connection=false`.
use `--update-connection=false`. If the value is unset and stdin is not a tty, no prompt or update
shall occur.
If the value is set to true, the machine connection will be set as the system default.
If the value is set to false, the system default will be unchanged.