Mattermost cmd line tool throws exception

Summary

Mattermost cmd line tool throws exception

Steps to reproduce

GitLab Omnibus Package Ubuntu Respository

  • GitLab CE v9.1.0
  • Mattermost v3.7.3

Expected behavior

No exception.

Observed behavior

./mattermost version throws an exception:

Version: 3.7.0

Build Number: 3.7.3

Build Date: Wed Mar 22 23:31:00 UTC 2017

Build Hash: 8ec3757

Build Enterprise Ready: false

panic: runtime error: invalid memory address or nil pointer dereference

[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xbfc2c6]

goroutine 1 [running]:

main.printVersion()

/home/ubuntu/workspace/msr/d/platform-release/src/github.com/mattermost/platform/cmd/platform/version.go:29 +0x3f6

main.versionCmdF(0x11a57a0, 0x11cb830, 0x0, 0x0)

/home/ubuntu/workspace/msr/d/platform-release/src/github.com/mattermost/platform/cmd/platform/version.go:20 +0x30

github.com/mattermost/platform/vendor/github.com/spf13/cobra.(*Command).execute(0x11a57a0, 0x11cb830, 0x0, 0x0, 0x11a57a0, 0x11cb830)

/home/ubuntu/workspace/msr/d/platform-release/src/github.com/mattermost/platform/vendor/github.com/spf13/cobra/command.go:647 +0x231

github.com/mattermost/platform/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4200a46c0, 0x0, 0x0, 0x0)

/home/ubuntu/workspace/msr/d/platform-release/src/github.com/mattermost/platform/vendor/github.com/spf13/cobra/command.go:734 +0x339

github.com/mattermost/platform/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4200a46c0, 0xc420134ac0, 0xb)

/home/ubuntu/workspace/msr/d/platform-release/src/github.com/mattermost/platform/vendor/github.com/spf13/cobra/command.go:692 +0x2b

main.main()

/home/ubuntu/workspace/msr/d/platform-release/src/github.com/mattermost/platform/cmd/platform/mattermost.go:50 +0x4b2

For anyone following the thread, an issue was opened in the GitLab Omnibus repository: https://gitlab.com/gitlab-org/omnibus-gitlab/issues/2277