mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
⚡ Add continueOnFail support to SSH Node
This commit is contained in:
@@ -328,7 +328,7 @@ export class Ssh implements INodeType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
|
try {
|
||||||
if (resource === 'command') {
|
if (resource === 'command') {
|
||||||
|
|
||||||
if (operation === 'execute') {
|
if (operation === 'execute') {
|
||||||
@@ -398,6 +398,23 @@ export class Ssh implements INodeType {
|
|||||||
returnData.push({ success: true });
|
returnData.push({ success: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log('error', error);
|
||||||
|
if (this.continueOnFail()) {
|
||||||
|
console.log('k1');
|
||||||
|
if (resource === 'file' && operation === 'download') {
|
||||||
|
items[i] = {
|
||||||
|
json: {
|
||||||
|
error: error.message,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
returnData.push({ error: error.message });
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ssh.dispose();
|
ssh.dispose();
|
||||||
|
|||||||
Reference in New Issue
Block a user