diff --git a/cmd/cmd.go b/cmd/cmd.go index 4229a40d..7c37418b 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1,6 +1,8 @@ package cmd import ( + "os" + "github.com/spf13/cobra" ) @@ -22,6 +24,9 @@ var ( func Execute() error { rootCmd.PersistentFlags().StringVar(&relayURL, "relay-url", "", "rendezvous relay to use") + if relayURL == "" { + relayURL = os.Getenv("WORMHOLE_RELAY_URL") + } rootCmd.AddCommand(recvCommand()) rootCmd.AddCommand(sendCommand())