diff --git a/detect_secrets/pre_commit_hook.py b/detect_secrets/pre_commit_hook.py index db77db99d..ed48df3d5 100644 --- a/detect_secrets/pre_commit_hook.py +++ b/detect_secrets/pre_commit_hook.py @@ -104,8 +104,10 @@ def get_baseline(baseline_filename): 'The supplied baseline may be incompatible with the current\n' 'version of detect-secrets. Please recreate your baseline to\n' 'avoid potential mis-configurations.\n\n' + '$ detect-secrets scan --update %s\n\n' 'Current Version: %s\n' 'Baseline Version: %s', + baseline_filename, VERSION, baseline_version if baseline_version else '0.0.0', ) diff --git a/tests/pre_commit_hook_test.py b/tests/pre_commit_hook_test.py index 6d730dab7..ecfca5d22 100644 --- a/tests/pre_commit_hook_test.py +++ b/tests/pre_commit_hook_test.py @@ -117,6 +117,8 @@ def test_fails_if_baseline_version_is_outdated( 'version of detect-secrets. Please recreate your baseline to\n' 'avoid potential mis-configurations.\n' '\n' + '$ detect-secrets scan --update will_be_mocked\n' + '\n' 'Current Version: {}\n' 'Baseline Version: {}\n' ).format(