From c4e20e17c7cc2abbf1bd4d614387b1b53c790d1f Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Thu, 20 Aug 2020 14:37:49 -0300 Subject: [PATCH] [web] fix -> not informing the env vars during the launch process --- CHANGELOG.md | 2 ++ bauh/gems/web/controller.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6192e87..fcac1531 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - minor fixes - Snap - some environment variables are not available during the common operations (install, upgrade, downgrade, uninstall, launch) +- Web + - some environment variable are not available during the launch process - UI - crashing when nothing can be upgraded - random C++ wrapper errors with some forms due to missing references diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index 365fb8f5..6361aec2 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -26,7 +26,7 @@ from bauh.api.abstract.model import SoftwarePackage, CustomSoftwareAction, Packa from bauh.api.abstract.view import MessageType, MultipleSelectComponent, InputOption, SingleSelectComponent, \ SelectViewType, TextInputComponent, FormComponent, FileChooserComponent, ViewComponent, PanelComponent from bauh.api.constants import DESKTOP_ENTRIES_DIR -from bauh.commons import resource, user +from bauh.commons import resource from bauh.commons.config import save_config from bauh.commons.html import bold from bauh.commons.system import ProcessHandler, get_dir_size, get_human_size_str, SimpleProcess @@ -949,7 +949,7 @@ class WebApplicationManager(SoftwareManager): return True def launch(self, pkg: WebApplication): - subprocess.Popen(pkg.get_command(), shell=user.is_root()) + subprocess.Popen(args=[pkg.get_command()], shell=True, env={**os.environ}) def get_screenshots(self, pkg: SoftwarePackage) -> List[str]: pass