Skip to content

Commit c84074d

Browse files
committed
fix: remove undefined check in constructStaticAnalysisOptions()
The filesystem path is always generated and defined, so the check was not necessary.
1 parent b88dba3 commit c84074d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/kube-scanner/image-scanner.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,8 @@ function getImageTag(imageWithTag: string): string {
2424
}
2525

2626
function constructStaticAnalysisOptions(
27-
fileSystemPath: string | undefined,
27+
fileSystemPath: string,
2828
): { staticAnalysisOptions: IStaticAnalysisOptions } {
29-
if (!fileSystemPath) {
30-
throw new Error('Missing path for image for static analysis');
31-
}
32-
3329
return {
3430
staticAnalysisOptions: {
3531
imagePath: fileSystemPath,

0 commit comments

Comments
 (0)