Skip to content

Expand environment variable defined in defaults.json#37

Open
Benjamin-Tan wants to merge 1 commit into
colcon:masterfrom
Benjamin-Tan:master
Open

Expand environment variable defined in defaults.json#37
Benjamin-Tan wants to merge 1 commit into
colcon:masterfrom
Benjamin-Tan:master

Conversation

@Benjamin-Tan
Copy link
Copy Markdown

This is to allow defaults.json to reference an environment variable.

This is to allow defaults.json to reference an environment variable.
@cottsay
Copy link
Copy Markdown
Member

cottsay commented Oct 4, 2023

I think this would constitute a breaking change as-is, and would behave differently on Windows where environment variables are denoted with % rather than $. That would imply that defaults files which use this mechanism wouldn't be cross-platform anymore.

Even though this improves the flexibility of defaults files, I think it could hinder debugging problems substantially.

@Benjamin-Tan
Copy link
Copy Markdown
Author

To have cross-platform compatibility, how about having a helper function to support for both $ and %?

It could also have the additional check on the syntax whether any environment variable reference is not defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants