You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the issue described on answers.ros: http://answers.ros.org/question/53777/setupsh-uses-rm-without-f-errors-on-loginnew-shell/
with a patch as below.
The other comment on answers might be worth to consider, although I do not see it being necessary to 'complicate' rm. $RM is not a default variable definition, and might also be dangerous, if you happen to have it set?
diff --git a/cmake/templates/setup.sh.in b/cmake/templates/setup.sh.in
index 4f5c662..1835215 100644
--- a/cmake/templates/setup.sh.in
+++ b/cmake/templates/setup.sh.in
@@ -34,11 +34,16 @@ export PKG_CONFIG_PATH
export PYTHONPATH
# invoke Python script to generate necessary exports of environment variables
-MKTEMP=`which mktemp`
-SETUP_TMP=`$MKTEMP /tmp/setup.sh.XXXXXXXXXX`
-$SETUP_UTIL $@ > $SETUP_TMP
-. $SETUP_TMP
-rm $SETUP_TMP
+MKTEMP="`which mktemp`"
+SETUP_TMP="`$MKTEMP /tmp/setup.sh.XXXXXXXXXX`"
+if [ $? -ne 0 ] ; then
+ echo "ROS config error: creating tmp file for setup failed" >> "/dev/stderr"
+ return 3
+else
+ $SETUP_UTIL $@ > "$SETUP_TMP"
+ . "$SETUP_TMP"
+ rm -f "$SETUP_TMP"
+fi
# remember type of shell if not already set
if [ -z "$CATKIN_SHELL" ]; then
The text was updated successfully, but these errors were encountered:
I have the issue described on answers.ros:
http://answers.ros.org/question/53777/setupsh-uses-rm-without-f-errors-on-loginnew-shell/
with a patch as below.
The other comment on answers might be worth to consider, although I do not see it being necessary to 'complicate' rm. $RM is not a default variable definition, and might also be dangerous, if you happen to have it set?
The text was updated successfully, but these errors were encountered: