-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Almost each hubctl extensions define the same base environment variables.
HUB_HOME="${HUB_HOME:-$(dirname "$0")}"
HUB_WORKDIR="${HUB_WORKDIR:-$(pwd)}"
HUB_EXTENSION="$(basename "$0" | sed 's/-/ /g')"Where:
HUB_HOMEis a path to the root directory of hubctl extensionsHUB_WORKDIRis a path where hubctl is runningHUB_EXTENSIONis the user-friendly name of the hubctl extension
And adds them to PATH: PATH="$HUB_HOME:$HUB_HOME/bin:$HUB_WORKDIR:$HUB_WORKDIR/bin:$PATH"
Such an approach leads to inconsistency in the development of new extensions where the exact definition is added by copy/paste or even skipped.
We could improve this situation by adding these variables before running the extension.
- Add base variables before running the extension
- Review and cleanup variables in existing extensions
- Document these variables
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request