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
While learning colcon for ROS 2 (as migrating from ROS 1).
I expected to colcon_cd to work like the ROS 1 roscd which allows for the following:
you:~/some_path$ roscd SOME_PACKAGE
you:/path/to/SOME_PACKAGE$ cd - # Return to previous PWD
you:~/some_path$
This was allowed since roscd only uses cd just before returning, allowing to use this default mechanism of cd.
However, when using colcon_cd the result is as follows:
you:~/some_path$ colcon_cd SOME_PACKAGE
you:/path/to/SOME_PACKAGE$ cd -
you:/path/to$ # Not where I expected to end up
As a result of some digging in the source, this is the result of cd-ing multiple times.
Looking at the cd documentation, this could possibly be changed by setting the OLDPWD environment variable, which is used to store the old path.
EDIT: I can make a PR for this if this change is desired.
The text was updated successfully, but these errors were encountered:
While learning
colcon
for ROS 2 (as migrating from ROS 1).I expected to
colcon_cd
to work like the ROS 1roscd
which allows for the following:This was allowed since
roscd
only usescd
just before returning, allowing to use this default mechanism ofcd
.However, when using
colcon_cd
the result is as follows:As a result of some digging in the source, this is the result of
cd
-ing multiple times.Looking at the
cd
documentation, this could possibly be changed by setting theOLDPWD
environment variable, which is used to store the old path.EDIT: I can make a PR for this if this change is desired.
The text was updated successfully, but these errors were encountered: