summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-10-07 04:35:21 +0000
committerGerrit Code Review <review@openstack.org>2022-10-07 04:35:21 +0000
commit5fef50ba355dcdee858acc60533793f61688e11f (patch)
tree9074dbed9dee8fa8b6c47950b941c50021ab31db
parentbd8f4cc68e08daccf958754b2fc8d10b5b3c91a6 (diff)
parent00f0708d051b680b4f5a18f927b791081054081f (diff)
downloadzuul-5fef50ba355dcdee858acc60533793f61688e11f.tar.gz
Merge "web: console -- clarify package: comment"
-rw-r--r--web/src/containers/build/Console.jsx14
1 files changed, 7 insertions, 7 deletions
diff --git a/web/src/containers/build/Console.jsx b/web/src/containers/build/Console.jsx
index 94c5f6f07..35a7b0a04 100644
--- a/web/src/containers/build/Console.jsx
+++ b/web/src/containers/build/Console.jsx
@@ -64,13 +64,13 @@ class TaskOutput extends React.Component {
renderResults(value) {
const interesting_results = []
- // This was written to assume "value" is an array of
- // key/value mappings to output. This seems to be a
- // good assumption for the most part, but "package:" for
- // whatever reason outputs a result that is just an array of
- // strings with what packages were installed. So, if we
- // see an array of strings as the value, we just swizzle
- // that into a key/value so it displays usefully.
+ // This was written to assume "value" is an array of key/value
+ // mappings to output. This seems to be a good assumption for the
+ // most part, but "package:" on at least some distros --
+ // RedHat/yum/dnf we've found -- outputs a result that is just an
+ // array of strings with what packages were installed. So, if we
+ // see an array of strings as the value, we just swizzle that into
+ // a key/value so it displays usefully.
const isAllStrings = value.every(i => typeof i === 'string')
if (isAllStrings) {
value = [ {output: [...value]} ]