Skip to content

Commit 42067f0

Browse files
authored
Merge pull request #115 from dlt-hub/feat/update-interactive-mode
overwrite output folder without asking if non interactive mode selected
2 parents 9e439c4 + 8754ffd commit 42067f0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dlt_init_openapi/cli/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _init_command_wrapped(
9999

100100
try:
101101

102-
# synch rest api
102+
# sync rest api
103103
update_rest_api.update_rest_api(force=update_rest_api_source)
104104

105105
config = _load_config(
@@ -117,7 +117,9 @@ def _init_command_wrapped(
117117
)
118118

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

0 commit comments

Comments
 (0)