diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-07-12 23:49:56 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-07-12 23:49:56 +0000 |
commit | 158f028c96c3bf8a683bbc98ccf23c546cc7b326 (patch) | |
tree | 41b5313c6f0ccc3589a58147d1fe1dced3aca012 /runsc/cmd/state.go | |
parent | cbf3251b8d2ea4b6ab3eff2bd6a4b2804a11706c (diff) | |
parent | 7132b9a07b55b1c2944f19bb938878d147785a72 (diff) |
Merge release-20210705.0-12-g7132b9a07 (automated)
Diffstat (limited to 'runsc/cmd/state.go')
-rw-r--r-- | runsc/cmd/state.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runsc/cmd/state.go b/runsc/cmd/state.go index 1f7913d5a..061003bab 100644 --- a/runsc/cmd/state.go +++ b/runsc/cmd/state.go @@ -45,7 +45,7 @@ func (*State) Usage() string { } // SetFlags implements subcommands.Command.SetFlags. -func (*State) SetFlags(f *flag.FlagSet) {} +func (*State) SetFlags(*flag.FlagSet) {} // Execute implements subcommands.Command.Execute. func (*State) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus { @@ -71,6 +71,8 @@ func (*State) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) s if err != nil { Fatalf("marshaling container state: %v", err) } - os.Stdout.Write(b) + if _, err := os.Stdout.Write(b); err != nil { + Fatalf("Error writing to stdout: %v", err) + } return subcommands.ExitSuccess } |