@@ -209,14 +209,14 @@ def deploy_config(
209209 retriable = False ,
210210 )
211211
212- if settings . VERBOSE :
212+ if ctx . obj . get ( "verbose" , False ) :
213213 print_info (f"Using API at { effective_api_url } " )
214214
215215 mcp_app_client = MCPAppClient (
216216 api_url = effective_api_url , api_key = effective_api_key
217217 )
218218
219- if settings . VERBOSE :
219+ if ctx . obj . get ( "verbose" , False ) :
220220 print_info (f"Checking for existing app ID for '{ app_name } '..." )
221221
222222 try :
@@ -232,7 +232,7 @@ def deploy_config(
232232 )
233233 app_id = app .appId
234234 print_success (f"Created new app '{ app_name } '" )
235- if settings . VERBOSE :
235+ if ctx . obj . get ( "verbose" , False ) :
236236 print_info (f"New app id: `{ app_id } `" )
237237 else :
238238 short_id = f"{ app_id [:8 ]} …"
@@ -243,7 +243,7 @@ def deploy_config(
243243 default = True ,
244244 )
245245 if use_existing :
246- if settings . VERBOSE :
246+ if ctx . obj . get ( "verbose" , False ) :
247247 print_info (f"Will deploy an update to app ID: `{ app_id } `" )
248248 else :
249249 print_error (
@@ -261,7 +261,7 @@ def deploy_config(
261261 update_payload ["unauthenticated_access" ] = unauthenticated_access
262262
263263 if update_payload :
264- if settings . VERBOSE :
264+ if ctx . obj . get ( "verbose" , False ) :
265265 print_info ("Updating app settings before deployment..." )
266266 run_async (
267267 mcp_app_client .update_app (
@@ -280,7 +280,7 @@ def deploy_config(
280280 # If a deployed secrets file already exists, determine if it should be used or overwritten
281281 if deployed_secrets_file :
282282 if secrets_file :
283- if settings . VERBOSE :
283+ if ctx . obj . get ( "verbose" , False ) :
284284 print_info (
285285 f"Both '{ MCP_SECRETS_FILENAME } ' and '{ MCP_DEPLOYED_SECRETS_FILENAME } ' found in { config_dir } ."
286286 )
@@ -320,7 +320,7 @@ def deploy_config(
320320 )
321321
322322 print_success ("Secrets file processed successfully" )
323- if settings . VERBOSE :
323+ if ctx . obj . get ( "verbose" , False ) :
324324 print_info (
325325 f"Transformed secrets file written to { secrets_transformed_path } "
326326 )
@@ -367,6 +367,7 @@ def deploy_config(
367367 mcp_app_client = mcp_app_client ,
368368 retry_count = retry_count ,
369369 ignore = ignore_path ,
370+ verbose = ctx .obj .get ("verbose" , False ),
370371 )
371372 )
372373
@@ -389,7 +390,7 @@ def deploy_config(
389390 return app_id
390391
391392 except Exception as e :
392- if settings . VERBOSE :
393+ if ctx . obj . get ( "verbose" , False ) :
393394 import traceback
394395
395396 typer .echo (traceback .format_exc ())
@@ -403,6 +404,7 @@ async def _deploy_with_retry(
403404 mcp_app_client : MCPAppClient ,
404405 retry_count : int ,
405406 ignore : Optional [Path ],
407+ verbose : bool = False ,
406408):
407409 """Execute the deployment operations with retry logic.
408410
@@ -423,6 +425,7 @@ async def _deploy_with_retry(
423425 api_key = api_key ,
424426 project_dir = project_dir ,
425427 ignore_file = ignore ,
428+ verbose = verbose ,
426429 )
427430 except Exception as e :
428431 raise CLIError (f"Bundling failed: { str (e )} " ) from e
@@ -482,7 +485,7 @@ async def _perform_api_deployment():
482485 raise
483486
484487 if retry_count > 1 :
485- if settings . VERBOSE :
488+ if verbose :
486489 print_info (f"Deployment API configured with up to { retry_count } attempts" )
487490
488491 try :
0 commit comments