@@ -478,7 +478,7 @@ func createAgentConfig(ctx context.Context, cmd *cli.Command) error {
478478 if configExists && lkConfig .HasAgent () {
479479 agentID = lkConfig .Agent .ID
480480 } else {
481- agentID , err = selectAgent (ctx , cmd , false )
481+ agentID , err = selectAgent (cmd , false )
482482 if err != nil {
483483 return err
484484 }
@@ -1010,7 +1010,7 @@ func getAgentID(ctx context.Context, cmd *cli.Command, agentDir string, tomlFile
10101010 }
10111011 agentID = lkConfig .Agent .ID
10121012 } else {
1013- agentID , err = selectAgent (ctx , cmd , excludeEmptyVersion )
1013+ agentID , err = selectAgent (cmd , excludeEmptyVersion )
10141014 if err != nil {
10151015 return "" , err
10161016 }
@@ -1027,11 +1027,10 @@ func getAgentID(ctx context.Context, cmd *cli.Command, agentDir string, tomlFile
10271027 return agentID , nil
10281028}
10291029
1030- func selectAgent (ctx context. Context , _ * cli.Command , excludeEmptyVersion bool ) (string , error ) {
1030+ func selectAgent (_ * cli.Command , excludeEmptyVersion bool ) (string , error ) {
10311031 var agents * lkproto.ListAgentsResponse
1032- var err error
10331032
1034- err = util .Await ("No agent ID provided, selecting from available agents..." , func (ctx context.Context ) error {
1033+ err : = util .Await ("No agent ID provided, selecting from available agents..." , func (ctx context.Context ) error {
10351034 var clientErr error
10361035 agents , clientErr = agentsClient .ListAgents (ctx , & lkproto.ListAgentsRequest {})
10371036 return clientErr
@@ -1143,9 +1142,7 @@ func requireDockerfile(_ context.Context, cmd *cli.Command, workingDir string, p
11431142 err := util .Await (
11441143 "Creating Dockerfile..." ,
11451144 func (ctx context.Context ) error {
1146- var clientErr error
1147- clientErr = agentfs .CreateDockerfile (workingDir , projectType , settingsMap )
1148- return clientErr
1145+ return agentfs .CreateDockerfile (workingDir , projectType , settingsMap )
11491146 },
11501147 )
11511148 if err != nil {
0 commit comments