Podmansh: Better error, increase timeout to 30s

Co-authored-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar
2023-07-18 09:11:17 -04:00
parent 34a2a48e9c
commit 6df17332b5
5 changed files with 10 additions and 5 deletions

View File

@@ -41,7 +41,10 @@ func main() {
if filepath.Base(os.Args[0]) == registry.PodmanSh ||
(len(os.Args[0]) > 0 && filepath.Base(os.Args[0][1:]) == registry.PodmanSh) {
shell := strings.TrimPrefix(os.Args[0], "-")
args := []string{shell, "exec", "-i", "--wait", "10"}
// The wait timeout will soon be made configurable via the
// upcoming `podmansh_timeout` option in containers.conf
args := []string{shell, "exec", "-i", "--wait", "30"}
if term.IsTerminal(0) || term.IsTerminal(1) || term.IsTerminal(2) {
args = append(args, "-t")
}