Small fixes and fix that some nodes changed incoming data

This commit is contained in:
Jan Oberhauser
2019-08-01 18:22:48 +02:00
parent fc4952f022
commit a8f1f9c0ba
10 changed files with 30 additions and 30 deletions

View File

@@ -92,10 +92,8 @@ export class ExecuteCommand implements INodeType {
items = [items[0]];
}
let item: INodeExecutionData;
const returnItems: INodeExecutionData[] = [];
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
item = items[itemIndex];
command = this.getNodeParameter('command', itemIndex) as string;
const {
@@ -105,13 +103,17 @@ export class ExecuteCommand implements INodeType {
stderr,
} = await execPromise(command);
item.json = {
exitCode,
stderr,
stdout,
};
returnItems.push(
{
json: {
exitCode,
stderr,
stdout,
},
},
);
}
return this.prepareOutputData(items);
return this.prepareOutputData(returnItems);
}
}