From 388b68cd05addf9ebddcc300546f3e0ec12ecb64 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Wed, 20 Apr 2022 17:22:55 +0530 Subject: [PATCH] Minor Fixes --- internal/cli/attach.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/cli/attach.go b/internal/cli/attach.go index e6454a1b22..eec8a28ed3 100644 --- a/internal/cli/attach.go +++ b/internal/cli/attach.go @@ -72,7 +72,7 @@ func (c *AttachCommand) Run(args []string) int { if len(args) == 0 { args = append(args, "") } - if args[0] != "" && string(args[0][0:2]) == "--" { + if args[0] != "" && strings.HasPrefix(args[0], "--") { if err := flags.Parse(args); err != nil { c.UI.Error(err.Error()) return 1 @@ -84,7 +84,10 @@ func (c *AttachCommand) Run(args []string) int { return 1 } } - c.remoteConsole() + if err := c.remoteConsole(); err != nil { + c.UI.Error(err.Error()) + return 1 + } return 0 }