Skip to content

Commit 12baacc

Browse files
author
Jason Yellick
committed
FAB-10445 configtxgen bad check on channel id
Fixes a bug where configtxgen was checking for an empty channel ID and printing a warning before the flags had actually been parsed. Change-Id: Ic62378d7f9245df54e23713d0b86598168b14589 Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
1 parent e53554d commit 12baacc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/tools/configtxgen/main.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,15 @@ func main() {
219219
flag.StringVar(&asOrg, "asOrg", "", "Performs the config generation as a particular organization (by name), only including values in the write set that org (likely) has privilege to set")
220220
flag.StringVar(&printOrg, "printOrg", "", "Prints the definition of an organization as JSON. (useful for adding an org to a channel manually)")
221221

222+
version := flag.Bool("version", false, "Show version information")
223+
224+
flag.Parse()
225+
222226
if channelID == "" {
223227
channelID = genesisconfig.TestChainID
224228
logger.Warningf("Omitting the channel ID for configtxgen is deprecated. Explicitly passing the channel ID will be required in the future, defaulting to '%s'.", channelID)
225229
}
226230

227-
version := flag.Bool("version", false, "Show version information")
228-
229-
flag.Parse()
230-
231231
// show version
232232
if *version {
233233
printVersion()

0 commit comments

Comments
 (0)