Trim space from agent token (#4465)

This commit is contained in:
6543
2024-11-26 22:21:07 +01:00
committed by GitHub
parent 7cedda7387
commit b23c72428f

View File

@@ -133,7 +133,7 @@ func run(ctx context.Context, c *cli.Command, backends []types.Backend) error {
agentConfig := readAgentConfig(agentConfigPath)
agentToken := c.String("grpc-token")
agentToken := strings.TrimSpace(c.String("grpc-token"))
grpcClientCtx, grpcClientCtxCancel := context.WithCancelCause(context.Background())
defer grpcClientCtxCancel(nil)
authClient := agent_rpc.NewAuthGrpcClient(authConn, agentToken, agentConfig.AgentID)