You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returncliutil.UsageError(`"cloudflared tunnel run" accepts only one argument, the ID or name of the tunnel to run.`)
629
637
}
630
-
tunnelRef:=c.Args().First()
631
-
iftunnelRef=="" {
632
-
// see if tunnel id was in the config file
633
-
tunnelRef=config.GetConfiguration().TunnelID
634
-
iftunnelRef=="" {
635
-
returncliutil.UsageError(`"cloudflared tunnel run" requires the ID or name of the tunnel to run as the last command line argument or in the configuration file.`)
636
-
}
637
-
}
638
638
639
639
ifc.String("hostname") !="" {
640
640
sc.log.Warn().Msg("The property `hostname` in your configuration is ignored because you configured a Named Tunnel "+
641
641
"in the property `tunnel` to run. Make sure to provision the routing (e.g. via `cloudflared tunnel route dns/lb`) or else "+
642
642
"your origin will not be reachable. You should remove the `hostname` property to avoid this warning.")
643
643
}
644
644
645
-
returnrunNamedTunnel(sc, tunnelRef)
645
+
// Check if token is provided and if not use default tunnelID flag method
returncliutil.UsageError("Provided Tunnel token is not valid.")
652
+
} else {
653
+
tunnelRef:=c.Args().First()
654
+
iftunnelRef=="" {
655
+
// see if tunnel id was in the config file
656
+
tunnelRef=config.GetConfiguration().TunnelID
657
+
iftunnelRef=="" {
658
+
returncliutil.UsageError(`"cloudflared tunnel run" requires the ID or name of the tunnel to run as the last command line argument or in the configuration file.`)
0 commit comments