Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for appending to environment variables #130

Merged
merged 2 commits into from
Dec 4, 2021

Conversation

cottsay
Copy link
Contributor

@cottsay cottsay commented Mar 26, 2021

It's currently possible to prepend unique values to environment variables. This change adds support for appending to them as well.

This works largely the same as 'prepend-non-duplicate', but instead puts
the candidate value at the end of the target variable.

Signed-off-by: Scott K Logan <logans@cottsay.net>
@cottsay cottsay added the enhancement New feature or request label Mar 26, 2021
@cottsay cottsay self-assigned this Mar 26, 2021
This function can then be called in packages' environment hooks.

Signed-off-by: Scott K Logan <logans@cottsay.net>
@cottsay cottsay force-pushed the cottsay/append-unique-value branch from 6c87d40 to be939ab Compare March 26, 2021 21:48
Copy link
Contributor

@audrow audrow left a comment

Choose a reason for hiding this comment

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

This looks good to me, although I'm not very familiar with .bat.in files, so maybe we want to get another reviewer.

Is there a good way to add a test for this?

@cottsay cottsay marked this pull request as ready for review December 4, 2021 01:10
@cottsay cottsay merged commit 37f9a1f into master Dec 4, 2021
@delete-merged-branch delete-merged-branch bot deleted the cottsay/append-unique-value branch December 4, 2021 01:19
@cottsay
Copy link
Contributor Author

cottsay commented Dec 9, 2021

@Mergifyio backport galactic

mergify bot pushed a commit that referenced this pull request Dec 9, 2021
This works largely the same as 'prepend-non-duplicate', but instead puts
the candidate value at the end of the target variable.

Signed-off-by: Scott K Logan <logans@cottsay.net>
(cherry picked from commit 37f9a1f)
@mergify
Copy link

mergify bot commented Dec 9, 2021

backport galactic

✅ Backports have been created

audrow pushed a commit that referenced this pull request Dec 20, 2021
This works largely the same as 'prepend-non-duplicate', but instead puts
the candidate value at the end of the target variable.

Signed-off-by: Scott K Logan <logans@cottsay.net>
(cherry picked from commit 37f9a1f)

Co-authored-by: Scott K Logan <logans@cottsay.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants