mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 10:03:42 +08:00 
			
		
		
		
	Merge pull request #504 from crazy-max/default-progress
Allow to set default progress through env var
This commit is contained in:
		@@ -311,7 +311,13 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func commonBuildFlags(options *commonOptions, flags *pflag.FlagSet) {
 | 
					func commonBuildFlags(options *commonOptions, flags *pflag.FlagSet) {
 | 
				
			||||||
	options.noCache = flags.Bool("no-cache", false, "Do not use cache when building the image")
 | 
						options.noCache = flags.Bool("no-cache", false, "Do not use cache when building the image")
 | 
				
			||||||
	flags.StringVar(&options.progress, "progress", "auto", "Set type of progress output (auto, plain, tty). Use plain to show container output")
 | 
					
 | 
				
			||||||
 | 
						defaultProgress, ok := os.LookupEnv("BUILDX_PROGRESS_DEFAULT")
 | 
				
			||||||
 | 
						if !ok {
 | 
				
			||||||
 | 
							defaultProgress = "auto"
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						flags.StringVar(&options.progress, "progress", defaultProgress, "Set type of progress output (auto, plain, tty). Use plain to show container output")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	options.pull = flags.Bool("pull", false, "Always attempt to pull a newer version of the image")
 | 
						options.pull = flags.Bool("pull", false, "Always attempt to pull a newer version of the image")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user