mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 17:14:43 +04:00
Expose --source and --origin as environment variables
This commit is contained in:
parent
75256522bc
commit
7b6ea994b8
1 changed files with 5 additions and 0 deletions
|
|
@ -220,6 +220,11 @@ def run(runner, args, environ=os.environ):
|
||||||
)
|
)
|
||||||
return 1
|
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:
|
if no_stash:
|
||||||
ctx = noop_context()
|
ctx = noop_context()
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue