diff --git a/cmd/root/api.go b/cmd/root/api.go index 9498ed821..ca0114142 100644 --- a/cmd/root/api.go +++ b/cmd/root/api.go @@ -94,7 +94,7 @@ func (f *apiFlags) runAPICommand(cmd *cobra.Command, args []string) error { // Monitor stdin for EOF to detect parent process death. // Only enabled when --exit-on-stdin-eof flag is passed. // When spawned with piped stdio, stdin closes when the parent process dies. - if f.exitOnStdinEOF && stdin != nil { + if f.exitOnStdinEOF { var cancel context.CancelFunc ctx, cancel = context.WithCancel(ctx) defer cancel()