Several people have asked for easier ways to read the current environment, like python's os.getenv()
The current workaround is to do str(local('echo $ENV_VAR')). This works, but is not super portable or ergonomic.
Interestingly, Starlark/Bazel has a way to do this:
https://github.com/bazelbuild/bazel/blob/1f684e1b87cd8881a0a4b33e86ba66743e32d674/src/main/java/com/google/devtools/build/lib/bazel/repository/skylark/SkylarkOS.java
but Starlark/Go does not
We should implement an os subset as a standalone package, so that other Starlark/Go-based projects can use it
See also: https://docs.python.org/3/library/os.html
Several people have asked for easier ways to read the current environment, like python's os.getenv()
The current workaround is to do
str(local('echo $ENV_VAR')). This works, but is not super portable or ergonomic.Interestingly, Starlark/Bazel has a way to do this:
https://github.com/bazelbuild/bazel/blob/1f684e1b87cd8881a0a4b33e86ba66743e32d674/src/main/java/com/google/devtools/build/lib/bazel/repository/skylark/SkylarkOS.java
but Starlark/Go does not
We should implement an os subset as a standalone package, so that other Starlark/Go-based projects can use it
See also: https://docs.python.org/3/library/os.html