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
This is not an issue, but it could be an imporvement. I setup ros_team_workspace with autosourcing a while ago, but I commented out the following lines from my ~/.bashrc when I stopped using it:
if [ -f ~/.ros_team_ws_rc ]; then
. ~/.ros_team_ws_rc
fi
When I wanted to use it again by running the command setup-auto-sourcing, I expected it to add the lines again or remove # but it didn't modify my ~/.bashrc at all. This is probably because of this condition in setup_auto_sourcing.bash:
if ! ( grep -q '\..*\.ros_team_ws_rc' $bashrc_location || grep -q 'source.*\.ros_team_ws_rc' $bashrc_location ); then
echo "" >> $bashrc_location
echo "# automatically source RosTeamWorkspace if the .ros_team_ws file is present in your home folder." >> $bashrc_location
echo "if [ -f ~/.ros_team_ws_rc ]; then" >> $bashrc_location
echo " . ~/.ros_team_ws_rc" >> $bashrc_location
echo "fi" >> $bashrc_location
fi
This checks that . ~/.ros_team_ws_rc exists without checking if it was commented out (if there's a # at the start of the line.
Steps to reproduce:
Clone repo (master) & run source setup.bash
run setup-auto-sourcing
Go to ~/.bashrc & comment out the lines:
if [ -f ~/.ros_team_ws_rc ]; then
. ~/.ros_team_ws_rc
fi
run setup-auto-sourcing again.
You'll notice that the setup.bash isn't sourced because the lines in ~/.bashrc aren't included back in.
The text was updated successfully, but these errors were encountered:
Hello
This is not an issue, but it could be an imporvement. I setup ros_team_workspace with autosourcing a while ago, but I commented out the following lines from my ~/.bashrc when I stopped using it:
When I wanted to use it again by running the command
setup-auto-sourcing
, I expected it to add the lines again or remove#
but it didn't modify my ~/.bashrc at all. This is probably because of this condition insetup_auto_sourcing.bash
:This checks that
. ~/.ros_team_ws_rc
exists without checking if it was commented out (if there's a # at the start of the line.Steps to reproduce:
source setup.bash
setup-auto-sourcing
setup-auto-sourcing
again.The text was updated successfully, but these errors were encountered: