summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-01-19 16:35:24 +0100
committerGitHub <noreply@github.com>2023-01-19 15:35:24 +0000
commit80db7a8a528bab6c24b5b04bc574d32f9d53809a (patch)
tree10546e26050cdc226801b89939701f2f0faec3bb /lib
parentd0c1b7a14e7d3107da0e6a9c81668fb2627069cd (diff)
downloadspack-80db7a8a528bab6c24b5b04bc574d32f9d53809a.tar.gz
spack-80db7a8a528bab6c24b5b04bc574d32f9d53809a.tar.bz2
spack-80db7a8a528bab6c24b5b04bc574d32f9d53809a.tar.xz
spack-80db7a8a528bab6c24b5b04bc574d32f9d53809a.zip
buildcache create: make "file exists" less verbose (#35019)
Currently we print 3 lines of "file exist" warning per tarball, this is a bit excessive. Instead, it can be a simple single-line tty.warn message.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/binary_distribution.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index 30783be8b6..9cd36ec303 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -510,9 +510,9 @@ class NoOverwriteException(spack.error.SpackError):
"""
def __init__(self, file_path):
- err_msg = "\n%s\nexists\n" % file_path
- err_msg += "Use -f option to overwrite."
- super(NoOverwriteException, self).__init__(err_msg)
+ super(NoOverwriteException, self).__init__(
+ '"{}" exists in buildcache. Use --force flag to overwrite.'.format(file_path)
+ )
class NoGpgException(spack.error.SpackError):