@@ -344,15 +344,15 @@ def observe_reboot_cycle(
344344
345345def repair_xattrs_operation (params : dict [str , object ], sink : EventSink ) -> OperationResult :
346346 operation = "repair-xattrs"
347- dry_run = bool_param (params , "dry_run" )
348- sink .stage (operation , "platform_check" )
349- if sys .platform != "darwin" :
350- raise AppOperationError (
351- "repair-xattrs must be run on macOS because it uses xattr/chflags on the mounted SMB share." ,
352- code = "validation_failed" ,
353- )
354347 sink .stage (operation , "validate_params" )
348+ dry_run = bool_param (params , "dry_run" )
355349 path = required_path_param (params , "path" )
350+ recursive = bool_param (params , "recursive" , True )
351+ max_depth = optional_int_param (params , "max_depth" )
352+ include_hidden = bool_param (params , "include_hidden" )
353+ include_time_machine = bool_param (params , "include_time_machine" )
354+ fix_permissions = bool_param (params , "fix_permissions" )
355+ verbose = bool_param (params , "verbose" )
356356 if not dry_run :
357357 require_confirmation (
358358 params ,
@@ -368,17 +368,23 @@ def repair_xattrs_operation(params: dict[str, object], sink: EventSink) -> Opera
368368 ),
369369 legacy_names = ("confirm_repair" ,),
370370 )
371+ sink .stage (operation , "platform_check" )
372+ if sys .platform != "darwin" :
373+ raise AppOperationError (
374+ "repair-xattrs must be run on macOS because it uses xattr/chflags on the mounted SMB share." ,
375+ code = "validation_failed" ,
376+ )
371377 config = load_optional_env_config (env_path = config_path (params ))
372378 args = argparse .Namespace (
373379 path = path ,
374380 dry_run = dry_run ,
375381 yes = not dry_run ,
376- recursive = bool_param ( params , " recursive" , True ) ,
377- max_depth = optional_int_param ( params , " max_depth" ) ,
378- include_hidden = bool_param ( params , " include_hidden" ) ,
379- include_time_machine = bool_param ( params , " include_time_machine" ) ,
380- fix_permissions = bool_param ( params , " fix_permissions" ) ,
381- verbose = bool_param ( params , " verbose" ) ,
382+ recursive = recursive ,
383+ max_depth = max_depth ,
384+ include_hidden = include_hidden ,
385+ include_time_machine = include_time_machine ,
386+ fix_permissions = fix_permissions ,
387+ verbose = verbose ,
382388 )
383389 context = RepairExecutionContext (lambda stage : sink .stage (operation , stage ))
384390 stdout_capture = LineLogCapture (lambda message : sink .log (operation , message , level = "info" ))
0 commit comments