fix(error): show error log.

This commit is contained in:
Bo-Yi Wu 2017-12-22 11:38:13 +08:00
parent 357e2db0ff
commit 43d4f0d781

16
main.go
View File

@ -1,6 +1,7 @@
package main
import (
"log"
"os"
"github.com/appleboy/easyssh-proxy"
@ -10,7 +11,10 @@ import (
)
// Version set at compile-time
var Version = "v1.0.0-dev"
var (
Version string
BuildNum string
)
func main() {
@ -217,7 +221,15 @@ VERSION:
REPOSITORY:
Github: https://github.com/appleboy/drone-scp
`
app.Run(os.Args)
app.Version = Version
if BuildNum != "" {
app.Version = app.Version + "+" + BuildNum
}
if err := app.Run(os.Args); err != nil {
log.Println(err)
}
}
func run(c *cli.Context) error {