ensure subject globs match only files (#54)
Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
@@ -56,6 +56,11 @@ const getSubjectFromPath = async (
|
||||
const files = await glob.create(subPath).then(async g => g.glob())
|
||||
|
||||
for (const file of files) {
|
||||
// Skip anything that is NOT a file
|
||||
if (!fs.statSync(file).isFile()) {
|
||||
continue
|
||||
}
|
||||
|
||||
const name = subjectName || path.parse(file).base
|
||||
const digest = await digestFile(DIGEST_ALGORITHM, file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user