Skip to content

Commit

Permalink
Merge pull request #91 from Yelp/improve_unable_to_open_baseline_msg
Browse files Browse the repository at this point in the history
Improve 'Unable to open baseline file' message
  • Loading branch information
KevinHock authored Oct 30, 2018
2 parents 3364c14 + 88b3fb6 commit 186e31e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion detect_secrets/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.10.4'
VERSION = '0.10.5'
2 changes: 1 addition & 1 deletion detect_secrets/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _perform_scan(args, plugins):


def _get_existing_baseline(import_filename):
# Favors --import argument over stdin.
# Favors --update argument over stdin.
if import_filename:
return _read_from_file(import_filename[0])
if not sys.stdin.isatty():
Expand Down
6 changes: 4 additions & 2 deletions detect_secrets/pre_commit_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ def _get_baseline_string_from_file(filename): # pragma: no cover

except IOError:
log.error(
'Unable to open baseline file: %s.', filename,
'Unable to open baseline file: {}\n'
'Please create it via\n'
' `detect-secrets scan > {}`\n'
.format(filename, filename),
)

raise


Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
coverage
flake8
flake8==3.5.0
mock
pre-commit
pytest
Expand Down

0 comments on commit 186e31e

Please sign in to comment.