Skip to content

Commit 192e193

Browse files
authored
Merge pull request #637 from dgageot/api-never-interactive
cagent api is never interactive
2 parents 2678580 + 8c19ee9 commit 192e193

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)