mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Update unstaged config file error message
This commit is contained in:
parent
8407b92b18
commit
81df782c20
1 changed files with 4 additions and 4 deletions
|
|
@ -223,10 +223,10 @@ def run(runner, args, environ=os.environ):
|
||||||
logger.error('Specify both --origin and --source.')
|
logger.error('Specify both --origin and --source.')
|
||||||
return 1
|
return 1
|
||||||
if _has_unstaged_config(runner) and not no_stash:
|
if _has_unstaged_config(runner) and not no_stash:
|
||||||
logger.error((
|
logger.error(
|
||||||
'Your {0} is unstaged.\n'
|
'Your pre-commit configuration is unstaged.\n'
|
||||||
'`git add {0}` to fix this.'
|
'`git add {}` to fix this.'.format(runner.config_file),
|
||||||
).format(C.CONFIG_FILE),)
|
)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
# Expose origin / source as environment variables for hooks to consume
|
# Expose origin / source as environment variables for hooks to consume
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue