From 5584a356a056043e85491cc14c1194dfa1be7239 Mon Sep 17 00:00:00 2001 From: Alexis Lopez Zubieta Date: Fri, 8 Apr 2022 11:53:27 -0500 Subject: [PATCH] fix: remove duplicated interpreter path mappings --- appimagebuilder/modules/setup/generator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/appimagebuilder/modules/setup/generator.py b/appimagebuilder/modules/setup/generator.py index f5aa5df5..9f527313 100644 --- a/appimagebuilder/modules/setup/generator.py +++ b/appimagebuilder/modules/setup/generator.py @@ -72,13 +72,14 @@ def generate(self): self._patch_interpreted_executables(executables, patcher) self._link_interpreters_from_runtimes(patcher.used_interpreters_paths) self._create_default_runtime(runtime_env) - self._setup_path_mappings(runtime_env, patcher.used_interpreters_paths) + self._setup_path_mappings(runtime_env, patcher.used_interpreters_paths.values()) self._write_appdir_env(runtime_env) self._deploy_apprun(resolver) - def _setup_path_mappings(self, runtime_env, interpreter_paths: dict): + def _setup_path_mappings(self, runtime_env, interpreter_paths: list): # map used interpreters - for path in interpreter_paths.values(): + interpreter_paths = sorted(set(interpreter_paths)) + for path in interpreter_paths: runtime_env.append(self.path_mappings_env, "/" + path + ":$APPDIR/" + path) # map build dir to allow caches to work