-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
status_nix.go
26 lines (21 loc) · 918 Bytes
/
status_nix.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2019 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
//go:build dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build dragonfly freebsd linux netbsd openbsd solaris
package status
import (
"strings"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/protocol/keybase1"
)
func osSpecific(mctx libkb.MetaContext, status *keybase1.FullStatus) error {
// TODO: on darwin, install.KeybaseServiceStatus() is implemented to get pid for service and kbfs.
// This is currently the best way to determine if KBFS is running, so other OS's should implement
// it.
productVersion, buildVersion, err := libkb.OSVersionAndBuild()
if err != nil {
mctx.Debug("Error determining OS version: %s", err)
}
status.ExtStatus.PlatformInfo.OsVersion = strings.Join([]string{productVersion, buildVersion}, "-")
return nil
}