#
Function Hooks
Bashly provides you with three general purpose hooks that let you inject your
own code. To use a hook, simply create one of the files listed below in your
src directory.
Tip
Run bashly add hooks to create the hook files in your source directory.
#
Alternatives
These hooks should be considered last resort, for any functionality that is not covered by more native means.
Below is a list of some related features that can be used instead of using these hooks:
- To change bash runtime parameters (e.g.
set -o pipefail), use thestrictsetting instead. - To verify a program is installed, use
dependenciesinstead. - To verify an environment variable is defined, use
environment_variablesinstead. - To perform validation operations, use Custom Validations instead.
- To halt the execution of the command unless certain conditions are met, use Custom Filters instead.