Skip to content

Commit

Permalink
Merge pull request #705 from eth-brownie/feat-version
Browse files Browse the repository at this point in the history
feat: add version flag
  • Loading branch information
iamdefinitelyahuman authored Jul 29, 2020
2 parents 1721e30 + d8a1376 commit 34b075b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions brownie/_cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
Options:
--help -h Display this message
--version Show version and exit
Type 'brownie <command> --help' for specific options and more information about
each command."""
Expand All @@ -36,6 +37,9 @@ def main():

print(f"Brownie v{__version__} - Python development framework for Ethereum\n")

if "--version" in sys.argv:
sys.exit()

if len(sys.argv) < 2 or sys.argv[1].startswith("-"):
# this call triggers a SystemExit
docopt(__doc__, ["brownie", "-h"])
Expand Down

0 comments on commit 34b075b

Please sign in to comment.