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

Commit 0513478

Browse files
committed
bugfix for env variable setting when workspaces have spaces, fixes #24
1 parent 20b0641 commit 0513478

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

env-hooks/15.rosjava.bash.em

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ SCRIPT=@(CMAKE_CURRENT_SOURCE_DIR)/generate_environment_variables.py
66
SCRIPT=@(CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_variables.py
77
@[end if]@
88

9-
export ROS_MAVEN_PATH=`python ${SCRIPT} --maven-path`
10-
export ROS_MAVEN_DEPLOYMENT_REPOSITORY=`python ${SCRIPT} --maven-deployment-repository`
11-
export ROS_MAVEN_REPOSITORY=`python ${SCRIPT} --maven-repository`
9+
export ROS_MAVEN_PATH="`python ${SCRIPT} --maven-path`"
10+
export ROS_MAVEN_DEPLOYMENT_REPOSITORY="`python ${SCRIPT} --maven-deployment-repository`"
11+
export ROS_MAVEN_REPOSITORY="`python ${SCRIPT} --maven-repository`"

env-hooks/15.rosjava.sh.em

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ SCRIPT=@(CMAKE_CURRENT_SOURCE_DIR)/generate_environment_variables.py
66
SCRIPT=@(CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_variables.py
77
@[end if]@
88

9-
export ROS_MAVEN_PATH=`python ${SCRIPT} --maven-path`
10-
export ROS_MAVEN_DEPLOYMENT_REPOSITORY=`python ${SCRIPT} --maven-deployment-repository`
11-
export ROS_MAVEN_REPOSITORY=`python ${SCRIPT} --maven-repository`
9+
export ROS_MAVEN_PATH="`python ${SCRIPT} --maven-path`"
10+
export ROS_MAVEN_DEPLOYMENT_REPOSITORY="`python ${SCRIPT} --maven-deployment-repository`"
11+
export ROS_MAVEN_REPOSITORY="`python ${SCRIPT} --maven-repository`"

generate_environment_variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_workspaces(environ):
2424
value = environ[env_name] if env_name in environ else ''
2525
paths = [path for path in value.split(os.pathsep) if path]
2626
# remove non-workspace paths
27-
workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))]
27+
workspaces = [path.replace(' ', '\ ') for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))]
2828
return workspaces
2929

3030
def get_environment_variable(environ, key):

0 commit comments

Comments
 (0)