-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support Environment Variables for Hook Commands (#27)
Adds ability to configure environment variables to be set when invoking hook commands. Variables are configured via hook "args" using the following argument pattern: --hook:env:NAME=VALUE feat: Add support for "--hook:error-on-output" in my-cmd-* hooks. * Can exist anywhere in the arg list before a '--' argument * re: Support for plain '--error-on-output' at first element * Still works (currently) * Is now deprecated and will be removed in a future version chore: Use "/usr/bin/env" to invoke commands * No-longer invokes the commands directly * Makes it trivial to pass environment variables to commands * Should not cause issues as /usr/bin/env was already vital chore: Add "shellcheck source" declarations on dynamically sourced files * Only files that were already modified for this PR were addressed Breaking Change: For compatibility with file-based hooks, Repo-based hooks no-longer ignore '--', or proceeding arguments, in the argument list. However, to further match file-based logic, the first '--' will be consumed, treating anything after it as OPTIONS to be passed to the hook command.
- Loading branch information
Showing
10 changed files
with
165 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.