Skip to content
Snippets Groups Projects
Unverified Commit aa83c483 authored by Greg Becker's avatar Greg Becker Committed by GitHub
Browse files

Bugfix/config caching 13754 (#13759)

* remove reference to `spack.store` in method definition

Referencing `spack.store` in method definition will cache the `spack.config.config` singleton variable too early, before we have a chance to add command line and environment scopes.
parent 46bfcbbd
No related branches found
No related tags found
No related merge requests found
......@@ -637,8 +637,7 @@ def is_relocatable(spec):
return True
def file_is_relocatable(
file, paths_to_relocate=[spack.store.layout.root, spack.paths.prefix]):
def file_is_relocatable(file, paths_to_relocate=None):
"""Returns True if the file passed as argument is relocatable.
Args:
......@@ -651,6 +650,8 @@ def file_is_relocatable(
ValueError: if the file does not exist or the path is not absolute
"""
default_paths_to_relocate = [spack.store.layout.root, spack.paths.prefix]
paths_to_relocate = paths_to_relocate or default_paths_to_relocate
if not (platform.system().lower() == 'darwin'
or platform.system().lower() == 'linux'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment