Skip to content

Commit

Permalink
Adds CLI arg to output version
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Jul 19, 2018
1 parent e270dca commit 9318cbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interfacer/src/browsh/browsh.go
Expand Up @@ -38,6 +38,7 @@ var (
// IsTesting is used in tests, so it needs to be exported
IsTesting = false
logfile string
_ = pflag.Bool("version", false, "Output current Browsh version")
)

func setupLogging() {
Expand Down Expand Up @@ -191,6 +192,10 @@ func ttyEntry() {
func MainEntry() {
pflag.Parse()
Initialise()
if viper.GetBool("version") {
println(browshVersion)
os.Exit(0)
}
if viper.GetBool("http-server-mode") {
HTTPServerStart()
} else {
Expand Down

0 comments on commit 9318cbf

Please sign in to comment.