Skip to content

Commit

Permalink
Merge pull request #115 from dlt-hub/feat/update-interactive-mode
Browse files Browse the repository at this point in the history
overwrite output folder without asking if non interactive mode selected
  • Loading branch information
sh-rp authored May 26, 2024
2 parents 9e439c4 + 8754ffd commit 42067f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dlt_init_openapi/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _init_command_wrapped(

try:

# synch rest api
# sync rest api
update_rest_api.update_rest_api(force=update_rest_api_source)

config = _load_config(
Expand All @@ -117,7 +117,9 @@ def _init_command_wrapped(
)

if config.project_dir.exists():
if not questionary.confirm(
if not interactive:
logger.info("Non interactive mode selected, overwriting existing source.")
elif not questionary.confirm(
f"Directory {config.project_dir} exists, do you want to continue and update the generated files? "
+ "This will overwrite your changes in those files."
).ask():
Expand Down

0 comments on commit 42067f0

Please sign in to comment.