diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b13ffc7..aa0097a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - not able to install classic Snaps due to Ubuntu's old Snaps API shutdown - some environment variables are not available during the common operations (install, upgrade, downgrade, uninstall, launch) - refresh app action: not returning an error when there is no update available + - not updating the table with the installed runtimes after a first Snap installation - Web - some environment variable are not available during the launch process - UI diff --git a/bauh/gems/snap/controller.py b/bauh/gems/snap/controller.py index 048380b8..0bc67433 100644 --- a/bauh/gems/snap/controller.py +++ b/bauh/gems/snap/controller.py @@ -1,5 +1,6 @@ import re import time +import traceback from threading import Thread from typing import List, Set, Type, Optional @@ -205,16 +206,16 @@ class SnapManager(SoftwareManager): if success: new_installed = [pkg] - if installed: - try: - current_installed = self.read_installed(disk_loader=disk_loader, internet_available=internet.is_available()).installed - except: - current_installed = None + try: + current_installed = self.read_installed(disk_loader=disk_loader, internet_available=internet.is_available()).installed + except: + traceback.print_exc() + current_installed = None - if current_installed and (not installed or len(current_installed) > len(installed) + 1): - for p in current_installed: - if p.name != pkg.name and (not installed or p.name not in installed): - new_installed.append(p) + if current_installed: + for p in current_installed: + if p.name != pkg.name and (not installed or p.name not in installed): + new_installed.append(p) return TransactionResult(success=success, installed=new_installed, removed=[]) else: