From baf836557c8005ab1e963e22b37c48165da13c1c Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Thu, 19 Oct 2023 00:37:27 +0700 Subject: [PATCH] cmd/cli: fix wrong checking condition in removeProvTokenFromArgs The provision token is only used once, then do not have any effect after Control D uid is fetched. So making it appears in "ctrld run" command is useless. --- cmd/cli/cli.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cli/cli.go b/cmd/cli/cli.go index d0d64c9..7a3da52 100644 --- a/cmd/cli/cli.go +++ b/cmd/cli/cli.go @@ -1769,12 +1769,12 @@ func removeProvTokenFromArgs(sc *service.Config) { continue } // For "--cd-org XXX", skip it and mark next arg skipped. - if x == cdOrgFlagName { + if x == "--"+cdOrgFlagName { skip = true continue } // For "--cd-org=XXX", just skip it. - if strings.HasPrefix(x, cdOrgFlagName+"=") { + if strings.HasPrefix(x, "--"+cdOrgFlagName+"=") { continue } a = append(a, x)