mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-04-27 19:05:23 +00:00
Skip errors when evaluating cmdline (best-effort)
This commit is contained in:
parent
06b8dc9c58
commit
a2cb5d95fb
@ -57,10 +57,11 @@ func start() error {
|
||||
}{}
|
||||
|
||||
var server string
|
||||
d, err := machine.DotToYAML("/proc/cmdline")
|
||||
if err == nil { // best-effort
|
||||
yaml.Unmarshal(d, &connectionDetails) //nolint:errcheck
|
||||
}
|
||||
|
||||
// best-effort
|
||||
d, _ := machine.DotToYAML("/proc/cmdline")
|
||||
yaml.Unmarshal(d, &connectionDetails) //nolint:errcheck
|
||||
|
||||
server = connectionDetails.Server
|
||||
if os.Getenv("WSS_SERVER") != "" {
|
||||
server = os.Getenv("WSS_SERVER")
|
||||
|
Loading…
Reference in New Issue
Block a user