From b017560edb2af08675fac91a3a225119f4fb619d Mon Sep 17 00:00:00 2001 From: Dramelac Date: Sun, 1 Dec 2024 19:43:25 +0100 Subject: [PATCH] Enable desktop if custom config is set --- exegol/manager/ExegolManager.py | 2 +- exegol/utils/DataFileUtils.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/exegol/manager/ExegolManager.py b/exegol/manager/ExegolManager.py index 8c81f700..f609a8e9 100644 --- a/exegol/manager/ExegolManager.py +++ b/exegol/manager/ExegolManager.py @@ -486,7 +486,7 @@ def __prepareContainerConfig(cls): if ParametersManager().envs is not None: for env in ParametersManager().envs: config.addRawEnv(env) - if UserConfig().desktop_default_enable ^ ParametersManager().desktop: + if (UserConfig().desktop_default_enable ^ ParametersManager().desktop) or ParametersManager().desktop_config != "": config.enableDesktop(ParametersManager().desktop_config) if ParametersManager().comment: config.addComment(ParametersManager().comment) diff --git a/exegol/utils/DataFileUtils.py b/exegol/utils/DataFileUtils.py index 7ab6a46a..d6c4ca51 100644 --- a/exegol/utils/DataFileUtils.py +++ b/exegol/utils/DataFileUtils.py @@ -80,6 +80,8 @@ def _create_config_file(self): os.chown(self._file_path, user_uid, user_gid) except PermissionError as e: logger.critical(f"Unable to open the file '{self._file_path}' ({e}). Please fix your file permissions or run exegol with the correct rights.") + except OSError as e: + logger.critical(f"A critical error occurred while interacting with filesystem: [{type(e)}] {e}") def _parse_config(self): data: Dict = {}