@@ -121,7 +121,7 @@ def show_version_mismatch_warning(self, current_version: str, deployed_version:
121
121
self .console .print () # Empty line for spacing
122
122
123
123
124
- def auto_bootstrap_if_needed (self , region : str ) -> bool :
124
+ def auto_bootstrap_if_needed (self , region : str , skip_confirm : bool = False ) -> bool :
125
125
"""
126
126
Automatically run bootstrap if needed based on comprehensive infrastructure check
127
127
Returns: True if bootstrap was run, False otherwise
@@ -145,18 +145,19 @@ def auto_bootstrap_if_needed(self, region: str) -> bool:
145
145
# Infrastructure missing/incomplete OR version mismatch - ask for confirmation
146
146
self .show_bootstrap_notification (current_version , deployed_version )
147
147
148
- # Ask for user confirmation
149
- if deployed_version :
150
- # Update scenario
151
- confirm_msg = f"Update infrastructure from { deployed_version } to { current_version } ?"
152
- else :
153
- # Initialize scenario
154
- confirm_msg = f"Initialize EMD infrastructure for version { current_version } ?"
155
-
156
- if not typer .confirm (confirm_msg , default = False ):
157
- self .console .print ("[yellow]Bootstrap cancelled. Infrastructure will not be updated.[/yellow]" )
158
- self .console .print ("[red]Deployment cannot proceed without compatible infrastructure.[/red]" )
159
- raise typer .Exit (1 )
148
+ # Ask for user confirmation unless skip_confirm is True
149
+ if not skip_confirm :
150
+ if deployed_version :
151
+ # Update scenario
152
+ confirm_msg = f"Update infrastructure from { deployed_version } to { current_version } ?"
153
+ else :
154
+ # Initialize scenario
155
+ confirm_msg = f"Initialize EMD infrastructure for version { current_version } ?"
156
+
157
+ if not typer .confirm (confirm_msg , default = False ):
158
+ self .console .print ("[yellow]Bootstrap cancelled. Infrastructure will not be updated.[/yellow]" )
159
+ self .console .print ("[red]Deployment cannot proceed without compatible infrastructure.[/red]" )
160
+ raise typer .Exit (1 )
160
161
161
162
# User confirmed - proceed with bootstrap
162
163
try :
0 commit comments