Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 81df782

Browse files
authored
Update unstaged config file error message
1 parent 8407b92 commit 81df782

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pre_commit/commands/run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@ def run(runner, args, environ=os.environ):
223223
logger.error('Specify both --origin and --source.')
224224
return 1
225225
if _has_unstaged_config(runner) and not no_stash:
226-
logger.error((
227-
'Your {0} is unstaged.\n'
228-
'`git add {0}` to fix this.'
229-
).format(C.CONFIG_FILE),)
226+
logger.error(
227+
'Your pre-commit configuration is unstaged.\n'
228+
'`git add {}` to fix this.'.format(runner.config_file),
229+
)
230230
return 1
231231

232232
# Expose origin / source as environment variables for hooks to consume

0 commit comments

Comments
 (0)