heroku / heroku/heroku-buildpack-python
Filter out Bash read-only env vars in `export_env()` (such as `UID`)
- Dominant language
- Ruby
- Stars
- 993
- Forks
- 1.8k
- Avg merge
- 10h 50m
- Merged PRs (30d)
- 10
Description
While looking at build failure metrics, I noticed this internal error:
```
-----> Installing dependencies using 'pip install -r requirements.txt'
/tmp/codon/tmp/buildpacks/0f40890b54a617ec2334fac0439a123c6a0c1136/vendor/buildpack-stdlib_v8.sh: line 56: UID: readonly variable
! Push rejected, failed to compile Python app.
```
This appears to be due to an app having the env var `UID` set in it's config vars, and `UID` being a read-only Bash env var.
We should filter this env var out (along with any others labelled as `readonly` on https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html), here:
https://github.com/heroku/heroku-buildpack-python/blob/fc441449edad0a631352ad51cd10f54677a1c01b/vendor/buildpack-stdlib_v8.sh#L44-L60
We should probably do this before implementing #1451 / #1700.
GUS-W-19247022.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.