Expose --source and --origin as environment variables

This commit is contained in:
Anthony Sottile 2017-06-27 10:08:16 -07:00
parent 75256522bc
commit 7b6ea994b8

View file

@ -220,6 +220,11 @@ def run(runner, args, environ=os.environ):
)
return 1
# Expose origin / source as environment variables for hooks to consume
if args.origin and args.source:
environ['PRE_COMMIT_ORIGIN'] = args.origin
environ['PRE_COMMIT_SOURCE'] = args.source
if no_stash:
ctx = noop_context()
else: