mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
cmd/ctrld: validate UID during start command
This commit is contained in:
+5
-1
@@ -341,7 +341,11 @@ func initCLI() {
|
|||||||
}
|
}
|
||||||
setDependencies(sc)
|
setDependencies(sc)
|
||||||
sc.Arguments = append([]string{"run"}, osArgs...)
|
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
|
cdUID = uid
|
||||||
removeProvTokenFromArgs(sc)
|
removeProvTokenFromArgs(sc)
|
||||||
// Pass --cd flag to "ctrld run" command, so the provision token takes no effect.
|
// Pass --cd flag to "ctrld run" command, so the provision token takes no effect.
|
||||||
|
|||||||
Reference in New Issue
Block a user