Skip to content

Commit

Permalink
So people don't think it's stuck, print that the cli is starting
Browse files Browse the repository at this point in the history
  • Loading branch information
Psychokiller1888 committed Jul 15, 2022
1 parent 82bc541 commit e3ae2c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion AliceCli/MainMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ def mainMenu(ctx: click.Context):
global CHECKED, VERSION

click.clear()
click.secho(message='Starting AliceCLI, checking for updates, please wait...')

if not CHECKED:
result = subprocess.run('pip index versions projectalice-cli'.split(), capture_output=True, text=True)
if 'error' not in result.stderr.lower():
regex = re.compile(r"INSTALLED:.*(?P<installed>[\d]+\.[\d]+\.[\d]+)\n.*LATEST:.*(?P<latest>[\d]+\.[\d]+\.[\d]+)")
match = regex.search(result.stdout.strip())

click.clear()
if not match:
click.secho(message='Failed checking CLI version\n', fg='red')
else:
Expand All @@ -62,10 +63,12 @@ def mainMenu(ctx: click.Context):

VERSION = str(installed)
else:
click.clear()
click.secho(message='Failed checking CLI version\n', fg='red')

CHECKED = True
else:
click.clear()
click.echo(f'Project Alice CLI version {VERSION}\n')

action = inquirer.select(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name='projectalice-cli',
version='1.3.23',
version='1.3.24',
long_description=Path('README.md').read_text(encoding='utf8'),
long_description_content_type='text/markdown',
python_requires='>=3.8',
Expand Down

0 comments on commit e3ae2c8

Please sign in to comment.