From 9e1706505fc83df3010b85191fca028a11a1ea91 Mon Sep 17 00:00:00 2001 From: Katrin Leinweber <9948149+katrinleinweber@users.noreply.github.com> Date: Sun, 12 May 2019 12:51:00 +0200 Subject: [PATCH] Add useful instruction to error message --- pre_commit/commands/run.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py index d060e186..6c191fac 100644 --- a/pre_commit/commands/run.py +++ b/pre_commit/commands/run.py @@ -152,7 +152,9 @@ def _run_single_hook(classifier, hook, args, skips, cols): # Print a message if failing due to file modifications if file_modifications: - output.write('Files were modified by this hook.') + output.write('Files were modified by this hook.' \ + 'Please review them in Git\'s staging area, ' \ + 'and repeat the commit.') if stdout or stderr: output.write_line(' Additional output:')