File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -419,12 +419,21 @@ def handle_env_python_add_hatch_mcp(args: Namespace) -> int:
419419 env_manager : "HatchEnvironmentManager" = args .env_manager
420420 hatch_env = getattr (args , "hatch_env" , None )
421421 tag = getattr (args , "tag" , None )
422+ dry_run = getattr (args , "dry_run" , False )
422423
423424 env_name = hatch_env or env_manager .get_current_environment ()
424425
426+ # Create reporter for unified output
427+ reporter = ResultReporter ("hatch env python add-hatch-mcp" , dry_run = dry_run )
428+ reporter .add (ConsequenceType .INSTALL , f"hatch_mcp_server wrapper in '{ env_name } '" )
429+
430+ if dry_run :
431+ reporter .report_result ()
432+ return EXIT_SUCCESS
433+
425434 if env_manager .install_mcp_server (env_name , tag ):
426- print ( f"hatch_mcp_server wrapper installed successfully in environment: { env_name } " )
435+ reporter . report_result ( )
427436 return EXIT_SUCCESS
428437 else :
429- print (f"Failed to install hatch_mcp_server wrapper in environment: { env_name } " )
438+ print (f"[ERROR] Failed to install hatch_mcp_server wrapper in environment: { env_name } " )
430439 return EXIT_ERROR
You can’t perform that action at this time.
0 commit comments