mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 13:25:02 -02:30
Fix undefined property error when task is of type yum/debug and was s… (#14372)
Signed-off-by: Ivanilson Junior <ivanilsonaraujojr@gmail.com>
This commit is contained in:
@@ -53,13 +53,9 @@ const getStdOutValue = (hostEvent) => {
|
|||||||
const res = hostEvent?.event_data?.res;
|
const res = hostEvent?.event_data?.res;
|
||||||
|
|
||||||
let stdOut;
|
let stdOut;
|
||||||
if (taskAction === 'debug' && res.result && res.result.stdout) {
|
if (taskAction === 'debug' && res?.result?.stdout) {
|
||||||
stdOut = res.result.stdout;
|
stdOut = res.result.stdout;
|
||||||
} else if (
|
} else if (taskAction === 'yum' && Array.isArray(res?.results)) {
|
||||||
taskAction === 'yum' &&
|
|
||||||
res.results &&
|
|
||||||
Array.isArray(res.results)
|
|
||||||
) {
|
|
||||||
stdOut = res.results.join('\n');
|
stdOut = res.results.join('\n');
|
||||||
} else if (res?.stdout) {
|
} else if (res?.stdout) {
|
||||||
stdOut = Array.isArray(res.stdout) ? res.stdout.join(' ') : res.stdout;
|
stdOut = Array.isArray(res.stdout) ? res.stdout.join(' ') : res.stdout;
|
||||||
|
|||||||
Reference in New Issue
Block a user