File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -922,15 +922,30 @@ def restart(
922922 invoke_without_command = True ,
923923)
924924@click .pass_context
925- def servers (context : click .Context ) -> int :
925+ def servers (context : click .Context ) -> None :
926926 """
927927 Commands to manipulate multiple Pyre servers.
928928 """
929+ pass
930+
931+
932+ @servers .result_callback ()
933+ @click .pass_context
934+ def run_default_servers_command (
935+ context : click .Context ,
936+ value : Optional [commands .ExitCode ],
937+ * args : object ,
938+ ** kwargs : object ,
939+ ) -> commands .ExitCode :
929940 if context .invoked_subcommand is None :
930941 arguments : command_arguments .CommandArguments = context .obj ["arguments" ]
931942 return commands .servers .run_list (arguments .output )
932- # This return value is not used anywhere.
933- return commands .ExitCode .SUCCESS
943+ elif value is not None :
944+ return value
945+ else :
946+ raise commands .ClientException (
947+ "Non-default serevers subcommand did not return a value"
948+ )
934949
935950
936951@servers .command (name = "list" )
You can’t perform that action at this time.
0 commit comments