aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-02-22 15:56:59 +0800
committerGitHub <noreply@github.com>2018-02-22 15:56:59 +0800
commit724a915470573ead1902df39150107ee1ff4f949 (patch)
tree80eed80a82246badacf3b890275f23cd587a95ef
parent45ce4dce3f9e9058d599fab85e4f5b8b7c9393cb (diff)
parent085d3fbf72c00bb0592e88eb6215602a5778979d (diff)
downloaddexon-724a915470573ead1902df39150107ee1ff4f949.tar
dexon-724a915470573ead1902df39150107ee1ff4f949.tar.gz
dexon-724a915470573ead1902df39150107ee1ff4f949.tar.bz2
dexon-724a915470573ead1902df39150107ee1ff4f949.tar.lz
dexon-724a915470573ead1902df39150107ee1ff4f949.tar.xz
dexon-724a915470573ead1902df39150107ee1ff4f949.tar.zst
dexon-724a915470573ead1902df39150107ee1ff4f949.zip
Merge pull request #16157 from nileshtrivedi/master
cmd/puppeth: Don't allow hyphen in network name. Fixes #16155
-rw-r--r--cmd/puppeth/wizard_intro.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/puppeth/wizard_intro.go b/cmd/puppeth/wizard_intro.go
index 84998afc9..60aa0f7ff 100644
--- a/cmd/puppeth/wizard_intro.go
+++ b/cmd/puppeth/wizard_intro.go
@@ -59,15 +59,16 @@ func (w *wizard) run() {
fmt.Println()
// Make sure we have a good network name to work with fmt.Println()
+ // Docker accepts hyphens in image names, but doesn't like it for container names
if w.network == "" {
- fmt.Println("Please specify a network name to administer (no spaces, please)")
+ fmt.Println("Please specify a network name to administer (no spaces or hyphens, please)")
for {
w.network = w.readString()
- if !strings.Contains(w.network, " ") {
+ if !strings.Contains(w.network, " ") && !strings.Contains(w.network, "-") {
fmt.Printf("\nSweet, you can set this via --network=%s next time!\n\n", w.network)
break
}
- log.Error("I also like to live dangerously, still no spaces")
+ log.Error("I also like to live dangerously, still no spaces or hyphens")
}
}
log.Info("Administering Ethereum network", "name", w.network)