Skip to content

Commit

Permalink
use runtime package to get GOOS and GOARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Aug 18, 2018
1 parent 896dda3 commit 6473e5c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"

"github.com/jesseduffield/lazygit/pkg/app"
"github.com/jesseduffield/lazygit/pkg/config"
Expand All @@ -15,9 +16,6 @@ var (
commit string
version = "unversioned"
date string
goos string
arch string
arm string

debuggingFlag = flag.Bool("debug", false, "a boolean")
versionFlag = flag.Bool("v", false, "Print the current version")
Expand Down Expand Up @@ -46,7 +44,7 @@ func main() {
version = fallbackVersion()
}
if *versionFlag {
fmt.Printf("commit=%s, build date=%s, version=%s, os=%s, arch=%s, arm=%s\n", commit, date, version, goos, arch, arm)
fmt.Printf("commit=%s, build date=%s, version=%s, os=%s, arch=%s\n", commit, date, version, runtime.GOOS, runtime.GOARCH)
os.Exit(0)
}
appConfig, err := config.NewAppConfig("lazygit", version, commit, date, debuggingFlag)
Expand Down

0 comments on commit 6473e5c

Please sign in to comment.