spack install: fail if --log-file and not --log-format (#36684)
fixes #34551 "spack install" now fails if a user passed the --logfile option without specifying a log format.
This commit is contained in:
		 Massimiliano Culpo
					Massimiliano Culpo
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							6e490f2239
						
					
				
				
					commit
					0b9694575f
				
			| @@ -340,6 +340,10 @@ def install(parser, args): | |||||||
|     if args.deprecated: |     if args.deprecated: | ||||||
|         spack.config.set("config:deprecated", True, scope="command_line") |         spack.config.set("config:deprecated", True, scope="command_line") | ||||||
| 
 | 
 | ||||||
|  |     if args.log_file and not args.log_format: | ||||||
|  |         msg = "the '--log-format' must be specified when using '--log-file'" | ||||||
|  |         tty.die(msg) | ||||||
|  | 
 | ||||||
|     arguments.sanitize_reporter_options(args) |     arguments.sanitize_reporter_options(args) | ||||||
| 
 | 
 | ||||||
|     def reporter_factory(specs): |     def reporter_factory(specs): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user