Skip to content

Commit

Permalink
fix(amazonq): support nested dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellandi committed Nov 27, 2024
1 parent 5766e4b commit 8c60e66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Amazon Q /dev not adding Dockerfiles in nested folders"
}
9 changes: 2 additions & 7 deletions packages/core/src/shared/filetypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,6 @@ export const wellKnownCodeFiles = new Set(['Dockerfile', 'Dockerfile.build'])

/** Returns true if `filename` is a code file. */
export function isCodeFile(filename: string): boolean {
if (codefileExtensions.has(path.extname(filename).toLowerCase())) {
return true
} else if (wellKnownCodeFiles.has(filename)) {
return true
} else {
return false
}
const ext = path.extname(filename).toLowerCase()
return codefileExtensions.has(ext) || wellKnownCodeFiles.has(path.basename(filename))
}

0 comments on commit 8c60e66

Please sign in to comment.