Minor Fixes

This commit is contained in:
Shivam Sharma 2022-04-20 17:22:55 +05:30 committed by Victor Castell
parent 00e51a99c0
commit 388b68cd05

View file

@ -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
}