@@ -742,7 +742,6 @@ func listAgentVersions(ctx context.Context, cmd *cli.Command) error {
742742
743743func listAgents (ctx context.Context , cmd * cli.Command ) error {
744744 var items []* lkproto.AgentInfo
745- req := & lkproto.ListAgentsRequest {}
746745 if cmd .IsSet ("id" ) {
747746 for _ , agentID := range cmd .StringSlice ("id" ) {
748747 if agentID == "" {
@@ -762,7 +761,7 @@ func listAgents(ctx context.Context, cmd *cli.Command) error {
762761 items = append (items , res .Agents ... )
763762 }
764763 } else {
765- agents , err := agentsClient .ListAgents (ctx , req )
764+ agents , err := agentsClient .ListAgents (ctx , & lkproto. ListAgentsRequest {} )
766765 if err != nil {
767766 if twerr , ok := err .(twirp.Error ); ok {
768767 if twerr .Code () == twirp .PermissionDenied {
@@ -955,7 +954,6 @@ func requireDockerfile(ctx context.Context, cmd *cli.Command, workingDir string)
955954
956955 if ! dockerfileExists {
957956 var clientSettingsResponse * lkproto.ClientSettingsResponse
958- var innerErr error
959957
960958 if ! cmd .Bool ("silent" ) {
961959 if err := util .Await (
@@ -970,13 +968,13 @@ func requireDockerfile(ctx context.Context, cmd *cli.Command, workingDir string)
970968 clientSettingsResponse , err = agentsClient .GetClientSettings (ctx , & lkproto.ClientSettingsRequest {})
971969 }
972970
973- if innerErr != nil {
974- if twerr , ok := innerErr .(twirp.Error ); ok {
971+ if err != nil {
972+ if twerr , ok := err .(twirp.Error ); ok {
975973 if twerr .Code () == twirp .PermissionDenied {
976974 return fmt .Errorf ("agent hosting is disabled for this project -- join the beta program here [%s]" , cloudAgentsBetaSignupURL )
977975 }
978976 }
979- return innerErr
977+ return err
980978 }
981979
982980 settingsMap := make (map [string ]string )
0 commit comments