MCPcopy Index your code
hub / github.com/docker/docker-agent / Enabled

Function Enabled

pkg/selfupdate/selfupdate.go:129–134  ·  view source on GitHub ↗

Enabled reports whether the self-update mechanism should run for this process. It is false when disabled by env, or when this process is already the re-executed child of a prior update (loop guard).

()

Source from the content-addressed store, hash-verified

127// process. It is false when disabled by env, or when this process is already
128// the re-executed child of a prior update (loop guard).
129func Enabled() bool {
130 if os.Getenv(envReExecMarker) != "" {
131 return false
132 }
133 return isTruthy(os.Getenv(EnvAutoUpdate))
134}
135
136// Run attempts a self-update. It never returns an error: on success it
137// re-executes the new binary (and does not return on Unix); on any failure or

Callers 3

ExecuteFunction · 0.92
TestEnabledFunction · 0.85
RunFunction · 0.85

Calls 1

isTruthyFunction · 0.85

Tested by 1

TestEnabledFunction · 0.68