Skip to content
Snippets Groups Projects
Commit 18860735 authored by Patrick Steinhardt's avatar Patrick Steinhardt
Browse files

hook: Replace broken ad-hoc implementation to get envvars

In the `hook` package we have an ad-hoc implementation to retrieve an
environment variable's value from an array. This implementation has two
problems:

    - It retrieves the first value instead of the last value as would be
      done by `os.Getenv()` in case the environment variable is defined
      multiple times.

    - It can segfault in case the environment variable doesn't have an
      equals sign in it.

Fix both bugs by instead using `env.ExtractValue()`.

Changelog: fixed
parent 89e38f87
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment