buildpacks/lifecycle

ENV Vars are harder to discover than cmd line options

Closed this issue · 1 comments

Description

suppose you run a command like:

CNB_USER_ID=1000 CNB_GROUP_ID=1000 CNB_PLATFORM_API=0.12 ../lifecycle/out/darwin-amd64/lifecycle/detector --log-level debug -layers="."  -app apps/bash-script

An astute maintainer might notice that there's no order.toml specified, and the user will in fact get an error message relating to order.toml. However, unlike the way for setting the "layers" directory, the way for setting the order.toml path is not discoverable by running detector --help.

Proposed solution

  • we could include the env var in the error message.

Describe alternatives you've considered

  • Is there a general way to add env vars to the cobra help output?

Additional context

hmmm it turns out just in general even the cmd line options require careful reading to discover , since there totally is one in this case.