Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
085d3fbf
Unverified
Commit
085d3fbf
authored
Feb 21, 2018
by
Nilesh Trivedi
Committed by
GitHub
Feb 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/puppeth: Don't allow hyphen in network name. Fixes #16155
parent
45ce4dce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
wizard_intro.go
cmd/puppeth/wizard_intro.go
+4
-3
No files found.
cmd/puppeth/wizard_intro.go
View file @
085d3fbf
...
...
@@ -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
(
"
\n
Sweet, 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment