github.com/bshelton229/agent@v3.5.4+incompatible/system/version_dump.go (about)

     1  // +build !windows
     2  
     3  package system
     4  
     5  import (
     6  	"runtime"
     7  
     8  	"github.com/buildkite/agent/process"
     9  )
    10  
    11  // Returns a dump of the raw operating system information
    12  func VersionDump() (string, error) {
    13  	if runtime.GOOS == "darwin" {
    14  		return process.Run("sw_vers")
    15  	} else if runtime.GOOS == "linux" {
    16  		return process.Cat("/etc/*-release"), nil
    17  	}
    18  
    19  	return "", nil
    20  }