Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 0729ea3

Browse files
committed
preserve ROS_MAVEN_DEPLOYMENT_REPOSITORY if already set and part of workspace chain
1 parent 5b5afb4 commit 0729ea3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

generate_environment_variables.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ def get_environment_variable(environ, key):
4545
repo = get_environment_variable(environment_variables, 'ROS_MAVEN_DEPLOYMENT_REPOSITORY')
4646
if repo is None:
4747
repo = os.path.join(workspaces[0], 'share', 'maven')
48-
else:
48+
else: #ROS_MAVEN_DEPLOYMENT_REPOSITORY is already set
4949
if repo in [os.path.join(w, 'share', 'maven') for w in workspaces]:
50+
# ROS_MAVEN_DEPLOYMENT_REPOSITORY is part of workspace chain
51+
pass
52+
else:
53+
# ROS_MAVEN_DEPLOYMENT_REPOSITORY is NOT part of workspace chain, set to top-most workspace
5054
repo = os.path.join(workspaces[0], 'share', 'maven')
5155
print(repo)
5256
elif args.maven_repository:

0 commit comments

Comments
 (0)