Skip to content

Commit 293e850

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
commands: pass opener to read_config_files called from update-config
Fix issue using remote resources in update-config command by passing the opener to read_config_files call. Signed-off-by: John Mulligan <[email protected]>
1 parent 5d19fd9 commit 293e850

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

sambacc/commands/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ def _update_config_args(parser: argparse.ArgumentParser) -> None:
7373
def _read_config(ctx: Context) -> config.InstanceConfig:
7474
cfgs = ctx.cli.config or []
7575
return config.read_config_files(
76-
cfgs, require_validation=ctx.require_validation
76+
cfgs,
77+
require_validation=ctx.require_validation,
78+
opener=ctx.opener,
7779
).get(ctx.cli.identity)
7880

7981

tests/test_commands_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import os
2222

2323
import sambacc.config
24+
import sambacc.opener
2425
import sambacc.paths
2526

2627
import sambacc.commands.config
@@ -113,6 +114,10 @@ def defaults(cls, cfg_path, watch=False):
113114
)
114115
return ctx
115116

117+
@property
118+
def opener(self) -> sambacc.opener.Opener:
119+
return sambacc.opener.FileOpener()
120+
116121

117122
class FakeWaiter:
118123
def __init__(self, attempts=None):

0 commit comments

Comments
 (0)