From 68ce25b287c73d0436211990ae4f50151e81793b Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 22 Dec 2021 17:49:26 -0300 Subject: [PATCH] [AppImage package] fix: not able to reinitialize --- CHANGELOG.md | 5 +++++ bauh/view/util/util.py | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cefc2b5..ea0c9f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [0.9.25] +### Fixes +- AppImage package + - not able to reinitialize (e.g: when settings are changed) + ## [0.9.24] 2021-12-17 ### Features - Web diff --git a/bauh/view/util/util.py b/bauh/view/util/util.py index 4d9078df..eaea3d7c 100644 --- a/bauh/view/util/util.py +++ b/bauh/view/util/util.py @@ -36,11 +36,10 @@ def get_default_icon(system: bool = True) -> Tuple[str, QIcon]: def restart_app(): - """ - :param show_panel: if the panel should be displayed after the app restart - :return: - """ - restart_cmd = [sys.executable, *sys.argv] + appimage_path = os.getenv('APPIMAGE') + + restart_cmd = [appimage_path] if appimage_path else [sys.executable, *sys.argv] + subprocess.Popen(restart_cmd) QCoreApplication.exit()