fix: ssh process error not resulting in pipeline error (#105)

* fix: ssh process error not resulting in pipeline error

* Update main.go
This commit is contained in:
Damian Kaczmarek 2017-11-09 20:47:15 -06:00 committed by Bo-Yi Wu
parent 9dd4b8db8d
commit 4d443c40f2
2 changed files with 4 additions and 2 deletions

View File

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

View File

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