Documentation
¶
Overview ¶
Package hook runs the user-supplied commands around a run: a pre-exec hook whose failure aborts the update, and a post-exec hook told whether anything changed. The hook contract travels in environment variables, always all set, so a stale inherited value can never leak a false fact into a hook.
Index ¶
Constants ¶
View Source
const ( // PhaseEnv tells the hook which side of the run it is on: pre or post. PhaseEnv = "CLOVER_PHASE" // ChangedEnv tells the hook whether the run rewrote anything: unknown in // pre (the run has not happened), true or false in post. ChangedEnv = "CLOVER_CHANGED" // SuccessEnv tells the hook whether the run finished cleanly: unknown in // pre, false in post when any marker failed or a write errored. SuccessEnv = "CLOVER_SUCCESS" )
Environment variable names of the hook contract.
View Source
const ( PhasePre = "pre" PhasePost = "post" )
Phase values for PhaseEnv.
Variables ¶
This section is empty.
Functions ¶
func DefaultShell ¶
func DefaultShell() string
DefaultShell returns the platform's default hook shell, which the --exec-shell flag advertises and falls back to.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.