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