diff options
author | Andreas Baumbach <healther@users.noreply.github.com> | 2018-08-29 19:10:55 +0200 |
---|---|---|
committer | scheibelp <scheibel1@llnl.gov> | 2018-08-29 13:10:55 -0400 |
commit | 5aded248a5c8c46c015aac89db36eb946a9dbd28 (patch) | |
tree | f59feb212977fd92b5c0fa5f261068c64d0135c9 /lib | |
parent | ebf21d1d87a14e8e2ab317a4acaa0ec66c002573 (diff) | |
download | spack-5aded248a5c8c46c015aac89db36eb946a9dbd28.tar.gz spack-5aded248a5c8c46c015aac89db36eb946a9dbd28.tar.bz2 spack-5aded248a5c8c46c015aac89db36eb946a9dbd28.tar.xz spack-5aded248a5c8c46c015aac89db36eb946a9dbd28.zip |
spack view suggests -I option for merge conflict (#9035)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/view.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index b847e89240..153168cf71 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -55,12 +55,12 @@ YamlFilesystemView. import os import llnl.util.tty as tty +from llnl.util.link_tree import MergeConflictError import spack.cmd import spack.store from spack.filesystem_view import YamlFilesystemView - description = "produce a single-rooted directory view of packages" section = "environment" level = "short" @@ -208,9 +208,15 @@ def view(parser, args): # Map action to corresponding functionality if args.action in actions_link: - view.add_specs(*specs, - with_dependencies=with_dependencies, - exclude=args.exclude) + try: + view.add_specs(*specs, + 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: view.remove_specs(*specs, |