Skip to content

Commit 8c19ee9

Browse files
committed
cagent api is never interactive
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent d838966 commit 8c19ee9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cmd/root/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ func NewAPICmd() *cobra.Command {
2424
Args: cobra.ExactArgs(1),
2525
RunE: func(cmd *cobra.Command, args []string) error {
2626
telemetry.TrackCommand("api", args)
27+
28+
// Make sure no question is ever asked to the user in api mode.
29+
os.Stdin = nil
30+
2731
return runHTTP(cmd, args)
2832
},
2933
}

0 commit comments

Comments
 (0)