MCPcopy Create free account
hub / github.com/celer-pkg/celer / setEnvIfNotEmpty

Function setEnvIfNotEmpty

envs/windows.go:74–78  ·  view source on GitHub ↗

setEnvIfNotEmpty sets an environment variable only if the provided value is non-empty.

(key, value string)

Source from the content-addressed store, hash-verified

72
73// setEnvIfNotEmpty sets an environment variable only if the provided value is non-empty.
74func setEnvIfNotEmpty(key, value string) {
75 if value != "" {
76 os.Setenv(key, value)
77 }
78}
79
80// AppendPythonBinDir appends the Python user "Scripts" directory to PATH if it exists.
81func AppendPythonBinDir(userBaseDir string) {

Callers 1

CleanEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected