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