Fix for replace stacks not working when agents was on multiline #7286
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.
What does this PR do?
This PR fixes replace_stacks to work with agents that are in a flat list in the stacks json as well as multi line. The regression was introduced in 2e90ad6 due to a misunderstanding of sed as well as a misunderstanding of the use case.
What issues does this PR fix or reference?
Fixes replace_stacks to work with agents that are a flat list in the stacks json as well as multi line.
Previously it would not remove com.redhat.bayesian.lsp from something like https://github.com/redhat-developer/rh-che/blob/master/assembly/fabric8-stacks/src/main/resources/stacks.json#L542 but would work for something like https://github.com/redhat-developer/rh-che/blob/master/assembly/fabric8-stacks/src/main/resources/stacks.json#L184. This PR makes it work for both cases.
Release Notes
N/A