mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/ctrld: validate UID during start command
This commit is contained in:
committed by
Cuong Manh Le
parent
774f07dd7f
commit
0dee7518c4
@@ -341,7 +341,11 @@ func initCLI() {
|
||||
}
|
||||
setDependencies(sc)
|
||||
sc.Arguments = append([]string{"run"}, osArgs...)
|
||||
if uid := cdUIDFromProvToken(); uid != "" {
|
||||
if cdUID != "" {
|
||||
if _, err := controld.FetchResolverConfig(cdUID, rootCmd.Version, cdDev); err != nil {
|
||||
mainLog.Load().Fatal().Err(err).Msgf("failed to fetch resolver uid: %s", cdUID)
|
||||
}
|
||||
} else if uid := cdUIDFromProvToken(); uid != "" {
|
||||
cdUID = uid
|
||||
removeProvTokenFromArgs(sc)
|
||||
// Pass --cd flag to "ctrld run" command, so the provision token takes no effect.
|
||||
|
||||
Reference in New Issue
Block a user