mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 01:53:42 +08:00 
			
		
		
		
	build: read provenance response mode in commands pkg
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
		@@ -206,7 +206,11 @@ func (o *buildOptions) toControllerOptions() (*controllerapi.BuildOptions, error
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	opts.WithProvenanceResponse = opts.PrintFunc == nil && len(o.metadataFile) > 0
 | 
			
		||||
	prm := confutil.MetadataProvenance()
 | 
			
		||||
	if opts.PrintFunc != nil || len(o.metadataFile) == 0 {
 | 
			
		||||
		prm = confutil.MetadataProvenanceModeDisabled
 | 
			
		||||
	}
 | 
			
		||||
	opts.ProvenanceResponseMode = string(prm)
 | 
			
		||||
 | 
			
		||||
	return &opts, nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user