init --option can now use json
This commit is contained in:
parent
eae60cedee
commit
748a1e97e4
@ -78,7 +78,13 @@ func initCmd(cmd *cobra.Command, args []string) error {
|
||||
if len(s) != 3 {
|
||||
return errors.New("Genesis option must be in the format <app>/<option>/<value>")
|
||||
}
|
||||
option := `"` + s[0] + `/` + s[1] + `", "` + s[2] + `"`
|
||||
|
||||
//Add quotes if the value (s[2]) is not json
|
||||
if !strings.Contains(s[2], "\"") {
|
||||
s[2] = `"` + s[2] + `"`
|
||||
}
|
||||
|
||||
option := `"` + s[0] + `/` + s[1] + `", ` + s[2]
|
||||
options = append(options, option)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user