diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2021-06-01 09:10:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 01:10:32 -0600 |
commit | bb5fd5c56714a81a3bea84b4827af70eddc32b18 (patch) | |
tree | 954f3a858274ebf49143e40a26ac15a2651f9fc6 /lib | |
parent | 40803365f32869164d77af060df328e827b1d34a (diff) | |
download | spack-bb5fd5c56714a81a3bea84b4827af70eddc32b18.tar.gz spack-bb5fd5c56714a81a3bea84b4827af70eddc32b18.tar.bz2 spack-bb5fd5c56714a81a3bea84b4827af70eddc32b18.tar.xz spack-bb5fd5c56714a81a3bea84b4827af70eddc32b18.zip |
Fix leading / during spack buildcache -f ... (#24028)
For me the buildcache force overwrite option does not work. It tries to
delete a file, but errors with a key error, apparently because the
leading / has to be removed.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/util/web.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index f59f3bb064..90c7c2b8cc 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -277,7 +277,7 @@ def remove_url(url, recursive=False): r = s3.delete_objects(Bucket=bucket, Delete=delete_request) _debug_print_delete_results(r) else: - s3.delete_object(Bucket=bucket, Key=url.path) + s3.delete_object(Bucket=bucket, Key=url.path.lstrip('/')) return # Don't even try for other URL schemes. |