mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[fix][tray] update notifications not working when launched through IDEs
This commit is contained in:
@@ -26,8 +26,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- not calling initial required tasks after enabling a new package type on settings
|
- not calling initial required tasks after enabling a new package type on settings
|
||||||
- minor fixes
|
- minor fixes
|
||||||
- Tray
|
- Tray
|
||||||
- notifications not working on Ubuntu 18.04
|
- update notifications not working on Ubuntu 18.04
|
||||||
|
- update notifications not working when launched through IDEs
|
||||||
|
|
||||||
## [0.9.5] 2020-06-07
|
## [0.9.5] 2020-06-07
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -28,10 +28,23 @@ from bauh.view.util.translation import I18n
|
|||||||
|
|
||||||
|
|
||||||
def get_cli_path() -> str:
|
def get_cli_path() -> str:
|
||||||
cli_path = system.run_cmd('which bauh-cli', print_error=False)
|
venv = os.getenv('VIRTUAL_ENV')
|
||||||
|
|
||||||
|
if venv:
|
||||||
|
cli_path = '{}/bin/bauh-cli'.format(venv)
|
||||||
|
|
||||||
|
if os.path.exists(cli_path):
|
||||||
|
return cli_path
|
||||||
|
elif not sys.executable.startswith('/usr'):
|
||||||
|
cli_path = '{}/bin/bauh-cli'.format(sys.prefix)
|
||||||
|
|
||||||
|
if os.path.exists(cli_path):
|
||||||
|
return cli_path
|
||||||
|
else:
|
||||||
|
cli_path = system.run_cmd('which bauh-cli', print_error=False)
|
||||||
|
|
||||||
if cli_path:
|
if cli_path:
|
||||||
return cli_path.strip()
|
return cli_path.strip()
|
||||||
|
|
||||||
|
|
||||||
def list_updates(logger: logging.Logger) -> List[PackageUpdate]:
|
def list_updates(logger: logging.Logger) -> List[PackageUpdate]:
|
||||||
|
|||||||
Reference in New Issue
Block a user