Skip to content

Commit

Permalink
fix(general): Fix empty credentials file issue (#5421)
Browse files Browse the repository at this point in the history
Fix empty credentials file issue
  • Loading branch information
Saarett committed Aug 8, 2023
1 parent be1f59b commit b9bfb54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checkov/common/bridgecrew/platform_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def read_key() -> str | None:
key = None
if os.path.exists(bridgecrew_file):
with open(bridgecrew_file, "r") as f:
key = f.readline()
key = f.readline() or None # in Mac, if the credentials file is empty, f.readline() == '' and it causes bugs
return key

0 comments on commit b9bfb54

Please sign in to comment.