File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,12 @@ Older usages are deprecated." {})))
117117
118118 (let [classpath (parse-classpath classpath-string)]
119119
120+ (when (empty? classpath)
121+ (throw (ex-info " No entries in given classpath qualify for analysis.
122+
123+ Note that only regular files (non-directories) are considered."
124+ {:classpath classpath-string})))
125+
120126 (when-not (System/getProperty " nvd-clojure.internal.skip-self-check" )
121127 (when-let [bad-entry (->> classpath
122128 (some (fn [^String entry]
@@ -130,19 +136,6 @@ Please refer to the project's README for recommended usages."
130136 {:bad-entry bad-entry
131137 :classpath classpath-string}))))
132138
133- ; ; perform some sanity checks for ensuring the calculated classpath has the expected format:
134- (let [f (-> classpath ^String (first ) File.)]
135- (when-not (.exists f)
136- (throw (ex-info (str " The classpath variable should be a vector of simple strings denoting existing files: "
137- (pr-str f))
138- {}))))
139-
140- (let [f (-> classpath ^String (last ) File.)]
141- (when-not (.exists f)
142- (throw (ex-info (str " The classpath variable should be a vector of simple strings denoting existing files: "
143- (pr-str f))
144- {}))))
145-
146139 ; ; specifically handle blank strings (in addition to nil)
147140 ; ; so that CLI callers can skip the first argument by simply passing an empty string:
148141 (let [config-filename (if (s/blank? config-filename)
You can’t perform that action at this time.
0 commit comments