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

Commit

Permalink
preserve ROS_MAVEN_DEPLOYMENT_REPOSITORY if already set and part of w…
Browse files Browse the repository at this point in the history
…orkspace chain
  • Loading branch information
fmessmer committed Sep 20, 2018
1 parent ce9a37f commit 4da3ba6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generate_environment_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4da3ba6

Please sign in to comment.