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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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)