Skip to content

Commit

Permalink
fix(terraformer): fix terraformer output dir being deleted (#4713)
Browse files Browse the repository at this point in the history
Signed-off-by: João Reigota <[email protected]>
  • Loading branch information
joaoReigota1 authored Jan 19, 2022
1 parent 33341a9 commit db927f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/scan/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ func extractPathType(paths []string) (regular, terraformer []string) {

func deleteExtractionFolder(extractionMap map[string]model.ExtractedPathObject) {
for extractionFile := range extractionMap {
if strings.Contains(extractionFile, "kics-extract-terraformer") {
continue
}
err := os.RemoveAll(extractionFile)
if err != nil {
log.Err(err).Msg("Failed to delete KICS extraction folder")
Expand Down

0 comments on commit db927f9

Please sign in to comment.