Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not leveraging scribe.Emitter functionality #337

Closed
ForestEckhardt opened this issue Apr 27, 2022 · 0 comments · Fixed by #349
Closed

Not leveraging scribe.Emitter functionality #337

ForestEckhardt opened this issue Apr 27, 2022 · 0 comments · Fixed by #349
Assignees
Projects

Comments

@ForestEckhardt
Copy link
Contributor

Currently in this and many other Python buildpacks you are using the following lines to output the environment:

cpython/build.go

Lines 150 to 153 in fc523d6

logger.Break()
logger.Process("Configuring environment")
logger.Subprocess("%s", scribe.NewFormattedMapFromEnvironment(cpythonLayer.SharedEnv))
logger.Break()

While this works there is emitter functionality to handle this for you. You can look at the following for an example:
https://github.com/paketo-buildpacks/node-engine/blob/d9d9e73751c125185e4d7b0356ed29b9658816e7/build.go#L165
This handles all of the formatting for all of the environment variables for you and will tell the user whether they are set at build or at launch time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants