spack view suggests -I option for merge conflict (#9035)
This commit is contained in:
		 Andreas Baumbach
					Andreas Baumbach
				
			
				
					committed by
					
						 scheibelp
						scheibelp
					
				
			
			
				
	
			
			
			 scheibelp
						scheibelp
					
				
			
						parent
						
							ebf21d1d87
						
					
				
				
					commit
					5aded248a5
				
			| @@ -55,12 +55,12 @@ | |||||||
| import os | import os | ||||||
|  |  | ||||||
| import llnl.util.tty as tty | import llnl.util.tty as tty | ||||||
|  | from llnl.util.link_tree import MergeConflictError | ||||||
|  |  | ||||||
| import spack.cmd | import spack.cmd | ||||||
| import spack.store | import spack.store | ||||||
| from spack.filesystem_view import YamlFilesystemView | from spack.filesystem_view import YamlFilesystemView | ||||||
|  |  | ||||||
|  |  | ||||||
| description = "produce a single-rooted directory view of packages" | description = "produce a single-rooted directory view of packages" | ||||||
| section = "environment" | section = "environment" | ||||||
| level = "short" | level = "short" | ||||||
| @@ -208,9 +208,15 @@ def view(parser, args): | |||||||
|  |  | ||||||
|     # Map action to corresponding functionality |     # Map action to corresponding functionality | ||||||
|     if args.action in actions_link: |     if args.action in actions_link: | ||||||
|         view.add_specs(*specs, |         try: | ||||||
|                        with_dependencies=with_dependencies, |             view.add_specs(*specs, | ||||||
|                        exclude=args.exclude) |                            with_dependencies=with_dependencies, | ||||||
|  |                            exclude=args.exclude) | ||||||
|  |         except MergeConflictError: | ||||||
|  |             tty.info("Some file blocked the merge, adding the '-i' flag will " | ||||||
|  |                      "ignore this conflict. For more information see e.g. " | ||||||
|  |                      "https://github.com/spack/spack/issues/9029") | ||||||
|  |             raise | ||||||
|  |  | ||||||
|     elif args.action in actions_remove: |     elif args.action in actions_remove: | ||||||
|         view.remove_specs(*specs, |         view.remove_specs(*specs, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user