Skip to content

Commit

Permalink
print version info
Browse files Browse the repository at this point in the history
  • Loading branch information
snigdhasjg committed Nov 7, 2023
1 parent 30a3012 commit 2c6dde0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aws_console/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
def aws_console():
args = parse_arguments()

if args.version:
print(__version__)
return

creds, region_name = aws_credentials(args)
url = signin_url(creds, region_name)

Expand Down
2 changes: 2 additions & 0 deletions aws_console/input_output/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def __arg_parser():
parser = argparse.ArgumentParser(
description="Open the AWS console in your web browser, using your AWS CLI credentials")

parser.add_argument('-v', '--version', action='store_true',
help="Display the version of this tool")
parser.add_argument('-P', '--profile', default=os.getenv("AWS_PROFILE"),
help="The AWS profile to create the pre-signed URL with")
parser.add_argument('-R', '--region', default=os.getenv("AWS_REGION", os.getenv("AWS_DEFAULT_REGION")),
Expand Down

0 comments on commit 2c6dde0

Please sign in to comment.