-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always prepend with a trailing separator (#254)
* Always prepend with a trailing separator This resolves an issue where environment variables can collid if modified by both .dsv files and scripts. For more detail see ament/ament_package#103 The solution is to always prepend, which will avoid overwriting a variable if previously set by a script. Then we introduce a cleanup command for each variable prepended to in order to remove a possible trailing separator. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Add batch command for trailing separator cleanup Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Address review * Rename operation to "remove trailing separator" * Make the format string definition optional * Simplify logic to remove a trailing separator if it exists (not caring about the last value) Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Minor cleanup Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Declare and document FORMAT_STR_REMOVE_TRAILING_SEPARATOR Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Simplify template logic Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Print cleanup commands directly instead of maintain list Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Add comment explaining change Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Only cleanup for variables initially set by the Python script Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix lint and clarify expand documentation Signed-off-by: Jacob Perron <jacob@openrobotics.org>
- Loading branch information
1 parent
025c520
commit c5983df
Showing
4 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters