diff --git a/main.go b/main.go index 0422553..096aba0 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 b40126a..120f92d 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 } }