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

Conversation

@AAlon
Copy link
Contributor

@AAlon AAlon commented Jan 25, 2020

wordexp (see http://man7.org/linux/man-pages/man3/wordexp.3.html) expands tilde by looking at $HOME. If $HOME is unset it will get the home directory from the pwd entry (pw_dir returned from http://man7.org/linux/man-pages/man3/getpwnam.3.html).
For ROS applications, before falling back to the pwd entry we'd like to use ROS_HOME if it exists.

This would result in a functionality similar to the one implemented at aws-robotics/cloudwatch-common#43, but better because we'd fallback to the pwd entry if no env variables are set. Plus, putting it here in aws_common so it'll be usable by other CEs, specifically for the rosbag uploader.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@AAlon AAlon requested review from raghaprasad and ryanewel January 25, 2020 00:00
@codecov
Copy link

codecov bot commented Jan 25, 2020

Codecov Report

Merging #52 into master will increase coverage by 0.62%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
+ Coverage   89.03%   89.65%   +0.62%     
==========================================
  Files          16       18       +2     
  Lines         830      880      +50     
==========================================
+ Hits          739      789      +50     
  Misses         91       91
Flag Coverage Δ
#ROS_1 89.65% <100%> (+0.62%) ⬆️
#ROS_2 91.83% <100%> (+0.5%) ⬆️
#dashing 91.83% <100%> (+0.5%) ⬆️
#kinetic 89.75% <100%> (+0.62%) ⬆️
#melodic 91.83% <100%> (+0.5%) ⬆️
Impacted Files Coverage Δ
aws_common/test/fs_utils/wordexp_ros_test.cpp 100% <100%> (ø)
aws_common/src/fs_utils/wordexp_ros.cpp 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f783023...55ff6b4. Read the comment docs.

Copy link
Contributor

@ryanewel ryanewel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@AAlon AAlon merged commit 247f9b8 into master Jan 27, 2020
@AAlon AAlon deleted the wordexp_ros branch January 27, 2020 22:54
ryanewel added a commit that referenced this pull request Mar 26, 2020
#52 adds a new feature for expanding file paths
@ryanewel ryanewel mentioned this pull request Mar 26, 2020
ryanewel added a commit that referenced this pull request Mar 26, 2020
#52 adds a new feature for expanding file paths
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants