From 8405b241a41cd8fdf80667df468c0247a8964959 Mon Sep 17 00:00:00 2001 From: Damian Kaczmarek Date: Thu, 9 Nov 2017 12:09:52 -0600 Subject: [PATCH] fix: ssh process error not resulting in pipeline error --- main.go | 5 ++++- plugin.go | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 0422553..e06fb7a 100644 --- a/main.go +++ b/main.go @@ -178,7 +178,10 @@ REPOSITORY: Github: https://github.com/appleboy/drone-ssh ` - app.Run(os.Args) + if err := app.Run(os.Args); err != nil { + fmt.Println("drone-ssh error: ", err) + os.Exit(1); + } } func run(c *cli.Context) error { diff --git a/plugin.go b/plugin.go index 3c3abb4..e71c638 100644 --- a/plugin.go +++ b/plugin.go @@ -160,7 +160,6 @@ func (p Plugin) Exec() error { case <-finished: case err := <-errChannel: if err != nil { - fmt.Println("drone-ssh error: ", err) return err } }