File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ var supportedTech = map[techutils.Technology]func(ca *CurationAuditCommand) (boo
104104 return ca .checkSupportByVersionOrEnv (techutils .Gem , MinArtiGradleGemSupport )
105105 },
106106 techutils .Docker : func (ca * CurationAuditCommand ) (bool , error ) {
107- return ca .DockerImageName () != "" , nil
107+ return ca .checkDockerSupport ()
108108 },
109109}
110110
@@ -132,6 +132,17 @@ func (ca *CurationAuditCommand) checkSupportByVersionOrEnv(tech techutils.Techno
132132 return true , nil
133133}
134134
135+ func (ca * CurationAuditCommand ) checkDockerSupport () (bool , error ) {
136+ dockerImageName := ca .DockerImageName ()
137+ if dockerImageName == "" {
138+ return false , nil
139+ }
140+ if ! strings .Contains (dockerImageName , "/" ) {
141+ return false , errorutils .CheckErrorf ("invalid docker image format: '%s'. Expected format: 'repo/image:tag' or 'repo/path/image:tag'" , dockerImageName )
142+ }
143+ return true , nil
144+ }
145+
135146func (ca * CurationAuditCommand ) getRtVersion (tech techutils.Technology ) (string , error ) {
136147 rtManager , _ , err := ca .getRtManagerAndAuth (tech )
137148 if err != nil {
You can’t perform that action at this time.
0 commit comments