File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,12 @@ def from_plugin_classname(
165
165
try :
166
166
klass = import_plugins ()[plugin_classname ]
167
167
except KeyError :
168
- log .warning ('No such plugin to initialize.' )
168
+ log .error ('Error: No such `{}` plugin to initialize.' .format (plugin_classname ))
169
+ log .error ('Chances are you should run `pre-commit autoupdate`.' )
170
+ log .error (
171
+ 'This error occurs when using a baseline that was made by '
172
+ 'a newer detect-secrets version than the one running.' ,
173
+ )
169
174
raise TypeError
170
175
171
176
try :
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def main(argv=None):
32
32
# If baseline is provided, we first want to make sure
33
33
# it's valid, before doing any further computation.
34
34
baseline_collection = get_baseline (args .baseline [0 ])
35
- except (IOError , ValueError ):
35
+ except (IOError , TypeError , ValueError ):
36
36
# Error logs handled within logic.
37
37
return 1
38
38
You can’t perform that action at this time.
0 commit comments