Skip to content

Commit

Permalink
fix checkRequiredFields
Browse files Browse the repository at this point in the history
  • Loading branch information
hmelder committed Mar 15, 2024
1 parent 0fdcd6b commit 6bab87b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ func checkRequiredFields(config *ConfigurationV1) error {
if config.PayloadType != "" && config.PayloadType != PayloadTypeTar && config.PayloadType != PayloadTypeTarGz {
return fmt.Errorf("unsupported payload type in config with name '%s': %s", config.Name, config.PayloadType)
}
}

if !config.SquashFS {
return fmt.Errorf("squashfs is required when tarball type is not specified")
}
if !config.SquashFS && config.TarballType == "" {
return fmt.Errorf("squashfs is required when tarball type is not specified")
}

return nil
Expand Down

0 comments on commit 6bab87b

Please sign in to comment.