Skip to content

Commit 92b3098

Browse files
committed
!squash more
1 parent dfc5cf9 commit 92b3098

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/vcspull/cli/add.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
log = logging.getLogger(__name__)
2121

2222

23-
def save_config_yaml(file_path: pathlib.Path, data: dict[str, t.Any]) -> None:
24-
"""Save dictionary to a YAML file."""
25-
with open(file_path, "w") as f:
26-
yaml.dump(data, f, sort_keys=False, indent=2, default_flow_style=False)
27-
28-
2923
def create_add_subparser(parser: argparse.ArgumentParser) -> None:
3024
"""Configure :py:class:`argparse.ArgumentParser` for ``vcspull add``."""
3125
parser.add_argument(
@@ -239,7 +233,13 @@ def add_repo(
239233
raw_config[actual_base_dir_key][repo_name] = repo_url
240234

241235
try:
242-
save_config_yaml(config_file_path, raw_config)
236+
# save_config_yaml(config_file_path, raw_config) # Original call to local/helper
237+
# The main application code should use a robust save mechanism.
238+
# For now, directly writing, similar to the old save_config_yaml.
239+
with open(config_file_path, "w") as f:
240+
yaml.dump(
241+
raw_config, f, sort_keys=False, indent=2, default_flow_style=False
242+
)
243243
log.info(
244244
f"Successfully added '{repo_name}' ({repo_url}) to {config_file_path} under '{actual_base_dir_key}'."
245245
)

0 commit comments

Comments
 (0)