pull: fallthrough for registry parsing errors
Pull is a bit of an "one size fits all" API to keep complexity away from callers and hide everything behind the interface. Commit369aaa4178recently altered the error reporting to when pulling fromt the `docker-daemon` transport which in turn caused a regression in Buildah CI when pulling `docker:latest`. Such an input would cause a parsing error in the `docker:`. Fix the regression by relaxing the stricter error reporting introduced by commit369aaa4178and make an exception for the `docker:` transport. Note that invalid input would still be caught a couple of lines below. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
		
							parent
							
								
									57dbcc0fa4
								
							
						
					
					
						commit
						f1f1300c77
					
				| 
						 | 
				
			
			@ -61,7 +61,10 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP
 | 
			
		|||
		// Check whether `name` points to a transport.  If so, we
 | 
			
		||||
		// return the error.  Otherwise we assume that `name` refers to
 | 
			
		||||
		// an image on a registry (e.g., "fedora").
 | 
			
		||||
		if alltransports.TransportFromImageName(name) != nil {
 | 
			
		||||
		//
 | 
			
		||||
		// NOTE: the `docker` transport is an exception to support a
 | 
			
		||||
		// `pull docker:latest` which would otherwise return an error.
 | 
			
		||||
		if t := alltransports.TransportFromImageName(name); t != nil && t.Name() != registryTransport.Transport.Name() {
 | 
			
		||||
			return nil, err
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue