Skip to content

Commit

Permalink
bug fix options
Browse files Browse the repository at this point in the history
and consistency changes
  • Loading branch information
kaiobendrauf committed May 24, 2024
1 parent 107eaa7 commit 2ef603f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions nudge-auto-updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,12 @@ def process_options():
options, _ = parser.parse_args()
# chack if api key in env
api_key = options.api_key
if not api_key:
if os.environ.get("VULNCHECK_API_KEY"):
api_key = os.environ.get("VULNCHECK_API_KEY")
if (not api_key) and os.environ.get("VULNCHECK_API_KEY"):
api_key = os.environ.get("VULNCHECK_API_KEY")
# check if slack url in env
if (not options.webhook_url) and os.environ.get("SLACK_WEBHOOK"):
slack_url = options.webhook_url
if (not slack_url) and os.environ.get("SLACK_WEBHOOK"):
slack_url = os.environ.get("SLACK_WEBHOOK")
else:
slack_url = options.slack_url
# return based on config file option
if options.config_file:
return options.sofa_url, options.nudge_file, api_key, options.config_file, True, slack_url, options.markdown_file, options.auto
Expand Down

0 comments on commit 2ef603f

Please sign in to comment.