File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/groovy/io/seqera/wave/model Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ import static io.seqera.wave.WaveDefault.DOCKER_IO
3232@CompileStatic
3333class ContainerCoordinates implements ContainerPath {
3434
35+ private final static List<String > VALID_SCHEMES = Arrays . asList(' oras' , ' s3' )
36+
3537 final String scheme
3638 final String registry
3739 final String image
@@ -57,8 +59,8 @@ class ContainerCoordinates implements ContainerPath {
5759 throw new IllegalArgumentException (" Invalid container name - offending image: '$path '" )
5860 final scheme = StringUtils . getUrlProtocol(path)
5961 if ( scheme ) {
60- if ( scheme != ' oras ' ) throw new IllegalArgumentException (" Invalid container scheme: '$scheme ' - offending image: '$path '" )
61- path = path. substring(7 )
62+ if ( ! VALID_SCHEMES . contains(scheme) ) throw new IllegalArgumentException (" Invalid container scheme: '$scheme ' - offending image: '$path '" )
63+ path = path. substring(scheme . length() + 3 ) // 3 is the length of '://' after scheme
6264 }
6365
6466 final coordinates = path. tokenize(' /' )
You can’t perform that action at this time.
0 commit comments