Skip to content

Commit b4fd8ff

Browse files
committed
Fix secrets volume is None
1 parent 3f1de5c commit b4fd8ff

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Diff for: superduper/base/config_settings.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ def config(self) -> t.Any:
9494

9595
secrets_volume = env.get('secrets_volume') or parent.get('secrets_volume')
9696

97-
secrets_volume = os.path.expanduser(secrets_volume)
97+
if secrets_volume:
98+
secrets_volume = os.path.expanduser(secrets_volume)
99+
98100
if secrets_volume and os.path.isdir(secrets_volume):
99101
load_secrets(secrets_volume)
100102
env = config_dicts.environ_to_config_dict(

Diff for: superduper/components/template.py

+8
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ def read(path):
5555
"""
5656
path = pathlib.Path(path)
5757

58+
if 'SUPERDUPER_CONFIG' in os.environ:
59+
os.environ['SUPERDUPER_CONFIG'] = os.path.abspath(
60+
os.environ['SUPERDUPER_CONFIG']
61+
)
62+
os.environ['SUPERDUPER_CONFIG'] = os.path.expanduser(
63+
os.environ['SUPERDUPER_CONFIG']
64+
)
65+
5866
@contextmanager
5967
def change_dir(destination):
6068
prev_dir = os.getcwd()

0 commit comments

Comments
 (0)