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.
This commit is contained in:
Cuong Manh Le
2023-10-19 00:37:27 +07:00
committed by Cuong Manh Le
parent 904b23eeac
commit baf836557c

View File

@@ -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)