aboutsummaryrefslogtreecommitdiff
path: root/pkg/env
Commit message (Collapse)AuthorAge
* Fix stuttersDaniel J Walsh2022-09-10
| | | | | | | | | | | | | | Podman adds an Error: to every error message. So starting an error message with "error" ends up being reported to the user as Error: error ... This patch removes the stutter. Also ioutil.ReadFile errors report the Path, so wrapping the err message with the path causes a stutter. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Allow podman to run in an environment with keys containing spacesDaniel J Walsh2022-08-23
| | | | | | Fixes: https://github.com/containers/podman/issues/15251 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* pkg: switch to golang native error wrappingSascha Grunert2022-07-08
| | | | | | | | | We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
* Add more unit testsBrent Baude2022-05-04
| | | | | | Improve "code coverage" with more unit-tests. Signed-off-by: Brent Baude <bbaude@redhat.com>
* linter: enable makezeroValentin Rothberg2022-03-22
| | | | Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* go fmt: use go 1.18 conditional-build syntaxValentin Rothberg2022-03-18
| | | | Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Implement env parsing on WindowsJason T. Greene2022-01-19
| | | | | | | Fixes #12056 Also, enables existing parsing logic for all Unix derived OSs Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* Generate kube should'd add podman default environment varsDaniel J Walsh2021-09-21
| | | | | | | | Currently we add the default PATH, TERM and container from Podman to every kubernetes.yaml file. These values should not be recorded in the yaml files. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Ensure DefaultEnvVariables is used in SpecgenMatthew Heon2020-08-18
| | | | | | | | | | | | When we rewrote Podman's pkg/spec, one of the things that was lost was our use of a set of default environment variables, that ensure all containers have at least $PATH and $TERM set. While we're in the process of re-adding it, change it from a variable to a function, so we can ensure the Join function does not overwrite it and corrupt the defaults. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
* make env handling os dependentBrent Baude2020-06-02
| | | | | | environment variables are handled differently on windows vs linux. here we split them to be handled but no actually processing of windows environment variables was done. it can be added for future. hoowever, now we dont get errors on windows about processing them. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Merge pull request #5381 from vrothberg/ENVFIXOpenShift Merge Robot2020-03-04
|\ | | | | env: set "container" to current binary
| * env: don't set "container" envValentin Rothberg2020-03-04
| | | | | | | | | | | | | | | | Leave setting the "container" variable to consumers of pkg/env. Podman is now hard-setting it to "podman" while "libpod" will set it internally to "libpod" if it's unset. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | avoid adding to nil mapBrent Baude2020-03-03
|/ | | | | | we need to make the environment map to avoid throwing an error when trying to add an environment value from file. Signed-off-by: Brent Baude <bbaude@redhat.com>
* consolidate env handling into pkg/envValentin Rothberg2020-03-03
Env-variable related code is scattered across several packages making it hard to maintain and extend. Consolidate the code into a new pkg/env package. Signed-off-by: Valentin Rothberg <rothberg@redhat.com> Signed-off-by: Matthew Heon <matthew.heon@pm.me>