(BKR-914) Add workaround for beaker bug BKR-914 #184
Merged
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.
The Windows 2012 R2 VMPooler templates were recently updated due to the older
cygwin version not populating environment variables correctly. However this exposed an
issue in Beaker (BKR-914) whereby it's
get_env_var
function was far too loosein its pattern matching causing multiple lines to be returned for a single env
var. This then caused newline characters to be injected into the
~/.ssh/environment
file, which then poluted calls to STDOUT and subsequentlyany tests that depended on parsing STDOUT could potentially fail.
This commit adds workarounds to this issue until BKR-914 is fixed and published.
get_env_var
is sanitised and if required, additional regexis injected to get the required effect from the
env | grep #{key}
call inBeaker
added if it does not exist. This avoids modifying the environment
unncessarily.
This commit can be partially revertted once BKR-914 is resolved and published.