aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/env.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/env.go b/commands/env.go
index ac7b789a..98a7e1a5 100644
--- a/commands/env.go
+++ b/commands/env.go
@@ -141,6 +141,9 @@ func loadBackendEnsureUser(env *Env) func(*cobra.Command, []string) error {
// This wrapper style is necessary because a Cobra PostE function does not run if RunE return an error.
func closeBackend(env *Env, runE func(cmd *cobra.Command, args []string) error) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, args []string) error {
+ env.err = out{Writer: cmd.ErrOrStderr()}
+ env.out = out{Writer: cmd.OutOrStdout()}
+
errRun := runE(cmd, args)
if env.backend == nil {