GoogleCloudPlatform / cloud-run-button

Let anyone deploy your GitHub repos to Google Cloud Run with a single click
https://cloud.run
Apache License 2.0
526 stars 91 forks source link

Hook Commands Don't Have All Envs #159

Closed jamesward closed 4 years ago

jamesward commented 4 years ago

I tried something that also needed HOME. Should we enable all the host env vars to be passed to the hook commands?

ahmetb commented 4 years ago

yeah I think we should totally do that. many env vars like LC_*, TERM, EDITOR ... can come in handy to hooks.

ahmetb commented 4 years ago

we need to remove this:

pathEnv := fmt.Sprintf("PATH=%s", os.Getenv("PATH"))

and just construct the array like:

hookEnvs := []string{a, b, c, os.Environ()...)