Skip to content

Commit

Permalink
Remove files starting with "_" from the output
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Sep 26, 2023
1 parent f57fb5f commit bd238a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/recipe/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ func (re *Recipe) Execute(values VariableValues, id uuid.UUID) (*Sauce, error) {
if len(strings.TrimSpace(string(content))) == 0 {
continue
}

// Skip files starting with "_"
if strings.HasPrefix(filename, "_") {
continue
}

sum := sha256.Sum256(content)
sauce.Files[filename] = File{Content: content, Checksum: fmt.Sprintf("sha256:%x", sum)}
idx += 1
Expand Down

0 comments on commit bd238a7

Please sign in to comment.