fix lowercase hostname
This commit is contained in:
parent
9f3f5c2f9b
commit
9f22576136
@ -104,6 +104,11 @@ func New(logger *logrus.Logger, version string) *Agent {
|
|||||||
winTempDir := defaultWinTmpDir
|
winTempDir := defaultWinTmpDir
|
||||||
winRunAsUserTmpDir := defaultWinTmpDir
|
winRunAsUserTmpDir := defaultWinTmpDir
|
||||||
|
|
||||||
|
hostname, err := os.Hostname()
|
||||||
|
if err != nil {
|
||||||
|
hostname = info.Hostname
|
||||||
|
}
|
||||||
|
|
||||||
var pybin string
|
var pybin string
|
||||||
switch runtime.GOARCH {
|
switch runtime.GOARCH {
|
||||||
case "amd64":
|
case "amd64":
|
||||||
@ -201,7 +206,7 @@ func New(logger *logrus.Logger, version string) *Agent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &Agent{
|
return &Agent{
|
||||||
Hostname: info.Hostname,
|
Hostname: hostname,
|
||||||
BaseURL: ac.BaseURL,
|
BaseURL: ac.BaseURL,
|
||||||
AgentID: ac.AgentID,
|
AgentID: ac.AgentID,
|
||||||
ApiURL: ac.APIURL,
|
ApiURL: ac.APIURL,
|
||||||
|
Loading…
Reference in New Issue
Block a user