From 9c2bb3f302c3c59899b7653a1b395c148a5b78c5 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Tue, 29 Apr 2014 14:30:36 -0500 Subject: [PATCH] Print version even outside repo --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index efdd0fe..b9ef49e 100644 --- a/main.go +++ b/main.go @@ -101,6 +101,11 @@ func main() { return } + if opts.Version { + fmt.Printf("Pear version %s\n", version) + os.Exit(0) + } + gitconfig, err := initGitConfig(opts) if err != nil { printStderrAndDie(err) @@ -113,11 +118,6 @@ func main() { os.Exit(0) } - if opts.Version { - fmt.Printf("Pear version %s\n", version) - os.Exit(0) - } - conf, err := readPearrc(pearrcpath()) if err != nil { printStderrAndDie(err)