From 486188dfaf7bfec0260e5a91e0e029345fd1fc33 Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Wed, 2 Oct 2024 10:53:58 +1000 Subject: [PATCH] fix: no interactive mode if not a terminal fixes: #2854 --- internal/terminal/interactive.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/terminal/interactive.go b/internal/terminal/interactive.go index a7c59fd4b9..5839ad9d0e 100644 --- a/internal/terminal/interactive.go +++ b/internal/terminal/interactive.go @@ -25,6 +25,9 @@ type KongContextBinder func(ctx context.Context, kctx *kong.Context) context.Con func RunInteractiveConsole(ctx context.Context, k *kong.Kong, binder KongContextBinder, client ftlv1connect.ControllerServiceClient) error { + if !readline.DefaultIsTerminal() { + return nil + } l, err := readline.NewEx(&readline.Config{ Prompt: interactivePrompt, InterruptPrompt: "^C",