From 0729ea366d71ed8d4c87801afe24adf10f4648aa Mon Sep 17 00:00:00 2001 From: fmessmer Date: Thu, 20 Sep 2018 15:13:34 +0200 Subject: [PATCH] preserve ROS_MAVEN_DEPLOYMENT_REPOSITORY if already set and part of workspace chain --- generate_environment_variables.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generate_environment_variables.py b/generate_environment_variables.py index 5d8f4ce..59c11f3 100755 --- a/generate_environment_variables.py +++ b/generate_environment_variables.py @@ -45,8 +45,12 @@ def get_environment_variable(environ, key): repo = get_environment_variable(environment_variables, 'ROS_MAVEN_DEPLOYMENT_REPOSITORY') if repo is None: repo = os.path.join(workspaces[0], 'share', 'maven') - else: + else: #ROS_MAVEN_DEPLOYMENT_REPOSITORY is already set if repo in [os.path.join(w, 'share', 'maven') for w in workspaces]: + # ROS_MAVEN_DEPLOYMENT_REPOSITORY is part of workspace chain + pass + else: + # ROS_MAVEN_DEPLOYMENT_REPOSITORY is NOT part of workspace chain, set to top-most workspace repo = os.path.join(workspaces[0], 'share', 'maven') print(repo) elif args.maven_repository: