Rethink os_release implementation
Jes Olson j3s@c3f.net
Sat, 01 Oct 2022 15:33:32 -0500
2 files changed,
11 insertions(+),
9 deletions(-)
M
env/env.go
→
env/env.go
@@ -66,17 +66,17 @@ // and are useful for identifying specific Linux distros, or their versions.
// // if you rely on these variables, I highly suggest checking for their // existence with test -z before utilizing them. there be no standards here. + env = expand.ListEnviron(path, // normie shit + uname_os, uname_hostname, uname_release, uname_arch) // uname-derivated env vars - os_release, err := getOSRelease() - if err != nil { - return env, err - } - osReleaseID := envString("OS_RELEASE_ID", os_release.ID) - osReleaseVersionID := envString("OS_RELEASE_VERSION_ID", os_release.VersionID) + // os_release, err := getOSRelease() + // if err != nil { + // return env, err + // } else { + // env = expand.ListEnviron(env.Get, envString("OS_RELEASE_ID", os_release.ID)) + // env += envString("OS_RELEASE_VERSION_ID", os_release.VersionID) + // } - env = expand.ListEnviron(path, // normie shit - uname_os, uname_hostname, uname_release, uname_arch, // uname-derivated env vars - osReleaseID, osReleaseVersionID) // /etc/os-release return env, nil }