diff --git a/Tasks/SshV0/ssh2helpers.ts b/Tasks/SshV0/ssh2helpers.ts index c90f41e8aa3d..14e5d6dd72dd 100644 --- a/Tasks/SshV0/ssh2helpers.ts +++ b/Tasks/SshV0/ssh2helpers.ts @@ -147,7 +147,11 @@ export function runCommandOnRemoteMachine( }).on('data', (data) => { if (data) { // "data" can be a buffer. Format it here so it outputs as a string - console.log(data.toString('utf8')); + if (tl.getPipelineFeature("trimSshTaskOutput")) { + console.log(data.toString('utf8').trim()); + } else { + console.log(data.toString('utf8')); + } if (!passwordSent) { passwordSent = handlePasswordInput(data, stream, password, dataBuffer); if (passwordSent) { @@ -174,7 +178,11 @@ export function runCommandOnRemoteMachine( }).on('data', (data) => { if (data) { // "data" can be a buffer. Format it here so it outputs as a string - console.log(data.toString('utf8')); + if (tl.getPipelineFeature("trimSshTaskOutput")) { + console.log(data.toString('utf8').trim()); + } else { + console.log(data.toString('utf8')); + } } }).stderr.on('data', (data) => { stdErrWritten = true; diff --git a/Tasks/SshV0/task.json b/Tasks/SshV0/task.json index a941aa433474..19189b7f4287 100644 --- a/Tasks/SshV0/task.json +++ b/Tasks/SshV0/task.json @@ -17,7 +17,7 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 245, + "Minor": 247, "Patch": 0 }, "demands": [], diff --git a/Tasks/SshV0/task.loc.json b/Tasks/SshV0/task.loc.json index 361afb87d4bc..4eb2cc758c59 100644 --- a/Tasks/SshV0/task.loc.json +++ b/Tasks/SshV0/task.loc.json @@ -17,7 +17,7 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 245, + "Minor": 247, "Patch": 0 }, "demands": [], diff --git a/_generated/SshV0.versionmap.txt b/_generated/SshV0.versionmap.txt index 1276f9dbe098..12a6febe611f 100644 --- a/_generated/SshV0.versionmap.txt +++ b/_generated/SshV0.versionmap.txt @@ -1,2 +1,2 @@ -Default|0.245.0 -Node20-225|0.245.1 +Default|0.247.0 +Node20-225|0.247.1 diff --git a/_generated/SshV0/ssh2helpers.ts b/_generated/SshV0/ssh2helpers.ts index c90f41e8aa3d..14e5d6dd72dd 100644 --- a/_generated/SshV0/ssh2helpers.ts +++ b/_generated/SshV0/ssh2helpers.ts @@ -147,7 +147,11 @@ export function runCommandOnRemoteMachine( }).on('data', (data) => { if (data) { // "data" can be a buffer. Format it here so it outputs as a string - console.log(data.toString('utf8')); + if (tl.getPipelineFeature("trimSshTaskOutput")) { + console.log(data.toString('utf8').trim()); + } else { + console.log(data.toString('utf8')); + } if (!passwordSent) { passwordSent = handlePasswordInput(data, stream, password, dataBuffer); if (passwordSent) { @@ -174,7 +178,11 @@ export function runCommandOnRemoteMachine( }).on('data', (data) => { if (data) { // "data" can be a buffer. Format it here so it outputs as a string - console.log(data.toString('utf8')); + if (tl.getPipelineFeature("trimSshTaskOutput")) { + console.log(data.toString('utf8').trim()); + } else { + console.log(data.toString('utf8')); + } } }).stderr.on('data', (data) => { stdErrWritten = true; diff --git a/_generated/SshV0/task.json b/_generated/SshV0/task.json index b024fc38632b..368f11b09822 100644 --- a/_generated/SshV0/task.json +++ b/_generated/SshV0/task.json @@ -17,7 +17,7 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 245, + "Minor": 247, "Patch": 0 }, "demands": [], @@ -165,7 +165,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backslash (\\). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "0.245.0", - "Node20-225": "0.245.1" + "Default": "0.247.0", + "Node20-225": "0.247.1" } } \ No newline at end of file diff --git a/_generated/SshV0/task.loc.json b/_generated/SshV0/task.loc.json index b7b7d75eecc1..e4c5bcb29d45 100644 --- a/_generated/SshV0/task.loc.json +++ b/_generated/SshV0/task.loc.json @@ -17,7 +17,7 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 245, + "Minor": 247, "Patch": 0 }, "demands": [], @@ -165,7 +165,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "0.245.0", - "Node20-225": "0.245.1" + "Default": "0.247.0", + "Node20-225": "0.247.1" } } \ No newline at end of file diff --git a/_generated/SshV0_Node20/ssh2helpers.ts b/_generated/SshV0_Node20/ssh2helpers.ts index c90f41e8aa3d..14e5d6dd72dd 100644 --- a/_generated/SshV0_Node20/ssh2helpers.ts +++ b/_generated/SshV0_Node20/ssh2helpers.ts @@ -147,7 +147,11 @@ export function runCommandOnRemoteMachine( }).on('data', (data) => { if (data) { // "data" can be a buffer. Format it here so it outputs as a string - console.log(data.toString('utf8')); + if (tl.getPipelineFeature("trimSshTaskOutput")) { + console.log(data.toString('utf8').trim()); + } else { + console.log(data.toString('utf8')); + } if (!passwordSent) { passwordSent = handlePasswordInput(data, stream, password, dataBuffer); if (passwordSent) { @@ -174,7 +178,11 @@ export function runCommandOnRemoteMachine( }).on('data', (data) => { if (data) { // "data" can be a buffer. Format it here so it outputs as a string - console.log(data.toString('utf8')); + if (tl.getPipelineFeature("trimSshTaskOutput")) { + console.log(data.toString('utf8').trim()); + } else { + console.log(data.toString('utf8')); + } } }).stderr.on('data', (data) => { stdErrWritten = true; diff --git a/_generated/SshV0_Node20/task.json b/_generated/SshV0_Node20/task.json index c41f32754efe..a87854d8b176 100644 --- a/_generated/SshV0_Node20/task.json +++ b/_generated/SshV0_Node20/task.json @@ -17,7 +17,7 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 245, + "Minor": 247, "Patch": 1 }, "demands": [], @@ -169,7 +169,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backslash (\\). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "0.245.0", - "Node20-225": "0.245.1" + "Default": "0.247.0", + "Node20-225": "0.247.1" } } \ No newline at end of file diff --git a/_generated/SshV0_Node20/task.loc.json b/_generated/SshV0_Node20/task.loc.json index c6ff445042bd..e569f6540d77 100644 --- a/_generated/SshV0_Node20/task.loc.json +++ b/_generated/SshV0_Node20/task.loc.json @@ -17,7 +17,7 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 245, + "Minor": 247, "Patch": 1 }, "demands": [], @@ -169,7 +169,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "0.245.0", - "Node20-225": "0.245.1" + "Default": "0.247.0", + "Node20-225": "0.247.1" } } \ No newline at end of file