Skip to content

Commit

Permalink
Merge pull request #84 from pmonks/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pmonks committed Jan 17, 2024
2 parents d59f7b8 + 44150cf commit 8a0c78d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pbr/tasks.clj
Expand Up @@ -367,8 +367,9 @@
:nvd -- opt: a map containing nvd-clojure-specific configuration options. See https://github.com/rm-hull/nvd-clojure#configuration-options"
[opts]
(when (s/blank? (System/getenv "NVD_API_TOKEN"))
(throw (ex-info "The NVD_API_TOKEN environment variable was not set. See https://github.com/rm-hull/nvd-clojure#configuration-options for more details about how to obtain an NVD API key." {})))
(when (and (s/blank? (System/getenv "NVD_API_TOKEN"))
(s/blank? (get-in opts [:nvd :nvd-api :key])))
(throw (ex-info "An NVD API token was not provided. See https://github.com/rm-hull/nvd-clojure#configuration-options for details on how to obtain one and provide it to PBR." {})))
(println "ℹ️ Running NVD vulnerability checker (this can take a while)...")
(flush)
; Notes: NVD *cannot* be run in a directory containing a deps.edn, as this "pollutes" the classpath of the JVM it's running in; something it is exceptionally sensitive to.
Expand Down

0 comments on commit 8a0c78d

Please sign in to comment.