This repository was archived by the owner on Feb 12, 2022. It is now read-only.
Add wordexp_ros wrapper for wordexp, allowing ROS-aware path expansion #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_dirreturned 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.