Skip to content

Commit

Permalink
refactor: ensure filetype detection is case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Nov 18, 2020
1 parent 7bdbc48 commit f99e807
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/iac/detect-iac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ async function getDirectoryFiles(
});

for (const filePath of directoryPaths) {
const fileType = pathLib.extname(filePath).substr(1) as IacFileTypes;
const fileType = pathLib
.extname(filePath)
.substr(1)
.toLowerCase() as IacFileTypes;
if (!fileType || !supportedExtensions.has(fileType)) {
continue;
}
Expand Down

0 comments on commit f99e807

Please sign in to comment.