-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ignore nil elements to avoid panic #1245
Conversation
@@ -38,6 +38,9 @@ func (reader *ConfigReader) Read(configFilePath string, cfg *aqua.Config) error | |||
func (reader *ConfigReader) readImports(configFilePath string, cfg *aqua.Config) error { | |||
pkgs := []*aqua.Package{} | |||
for _, pkg := range cfg.Packages { | |||
if pkg == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check aqua.yaml
's packages
.
@@ -74,6 +74,9 @@ func (registries *Registries) UnmarshalYAML(unmarshal func(interface{}) error) e | |||
} | |||
m := make(map[string]*Registry, len(arr)) | |||
for _, registry := range arr { | |||
if registry == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check aqua.yaml
's registries
.
@@ -31,6 +31,10 @@ func (pkgInfos *PackageInfos) toMap(logE *logrus.Entry, logLevel logrus.Level) m | |||
for _, pkgInfo := range *pkgInfos { | |||
logE := logE | |||
pkgInfo := pkgInfo | |||
if pkgInfo == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check registry.yaml
's packages
.
@@ -41,6 +40,10 @@ func (inst *Installer) InstallRegistries(ctx context.Context, cfg *aqua.Config, | |||
registryContents := make(map[string]*registry.Config, len(cfg.Registries)+1) | |||
|
|||
for _, registry := range cfg.Registries { | |||
if registry == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check aqua.yaml
's registries
.
Close #1244