Hook commands now validate that environment variable references (${...}) match the correct variables available for that hook type. Invalid references produce warnings during validation.
Evidence
Hook env var validation (search for "Hook command references ${")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.