From 73bd3fc3499d07ed69199fddceaea242bf26b6ec Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Thu, 6 Jun 2024 13:55:23 +0200
Subject: [PATCH] exec is always interactive

---
 TODO            | 1 -
 shipcat/main.py | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/TODO b/TODO
index 68ee3bc..1811744 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,5 @@
 - colors
 - "shc CONTAINER start" vs. "shc CONTAINER shell"
-- exec -i
 
 Albireo cleanup:
 - prerouting rule
diff --git a/shipcat/main.py b/shipcat/main.py
index b42460d..6399d80 100755
--- a/shipcat/main.py
+++ b/shipcat/main.py
@@ -262,9 +262,9 @@ def cmd_shell(args: argparse.Namespace) -> None:
 def cmd_exec(args: argparse.Namespace) -> None:
     cc = setup_container(args, False)
 
-    cmd = ['podman', 'exec']
+    cmd = ['podman', 'exec', '--interactive']
     if args.tty is not None:
-        cmd.extend(['--interactive', '--tty'])
+        cmd.append('--tty')
     if args.user is not None:
         cmd.extend(['--user', args.user])
     cmd.append(cc.container)
-- 
GitLab