We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e62b3bf commit 69bcde5Copy full SHA for 69bcde5
1 file changed
stashcp/__init__.py
@@ -845,10 +845,15 @@ def main():
845
get_best_stashcache()
846
# does not return
847
848
- if 'CACHES_JSON' in os.environ:
+ if args.caches_json:
849
+ caches_json_location = args.caches_json
850
+ elif 'CACHES_JSON' in os.environ:
851
caches_json_location = os.environ['CACHES_JSON']
852
else:
- caches_json_location = args.caches_json
853
+ prefix = os.environ.get("OSG_LOCATION", "/")
854
+ caches_file = os.path.join(prefix, "etc/stashcache/caches.json")
855
+ if os.path.exists(caches_file):
856
+ caches_json_location = caches_file
857
858
cache_list_name = args.cache_list_name
859
if args.closest or args.list_names:
0 commit comments