Commit d4adf7a
committed
[FAB-5141] configtxgen --version should not panic
If configtxgen cannot find a configtx.yaml file,
it panics. While this in and of itself is ok,
it should not panic when simply trying to get the
version.
Two changes were made:
- move response to --version above all other flags
- added a defer / recover function to better handle
config not found and make things more clear
Change-Id: I512d1fed464c734db7178eb576440c45767f6994
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>1 parent ace2a64 commit d4adf7a
1 file changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
350 | 357 | | |
351 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
352 | 371 | | |
353 | 372 | | |
354 | 373 | | |
355 | 374 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | 375 | | |
362 | 376 | | |
363 | 377 | | |
| |||
0 commit comments