diff --git a/Tasks/BashV3/Tests/L0.ts b/Tasks/BashV3/Tests/L0.ts index 81c51b7bacd3..f3505780a386 100644 --- a/Tasks/BashV3/Tests/L0.ts +++ b/Tasks/BashV3/Tests/L0.ts @@ -34,6 +34,7 @@ describe('Bash Suite', function () { it('Runs a checked in script correctly', (done: Mocha.Done) => { delete process.env['AZP_BASHV3_OLD_SOURCE_BEHAVIOR']; + process.env['AZP_TASK_FF_BASHV3_ENABLE_SECURE_ARGS'] = 'false' let tp: string = path.join(__dirname, 'L0External.js'); let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp); @@ -55,6 +56,7 @@ describe('Bash Suite', function () { it('Runs a checked in script correctly when using the old behavior', (done: Mocha.Done) => { process.env['AZP_BASHV3_OLD_SOURCE_BEHAVIOR'] = "true"; + process.env['AZP_TASK_FF_BASHV3_ENABLE_SECURE_ARGS'] = 'false' let tp: string = path.join(__dirname, 'L0External.js'); let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp); @@ -76,6 +78,7 @@ describe('Bash Suite', function () { it('Adds arguments to the script', (done: Mocha.Done) => { delete process.env['AZP_BASHV3_OLD_SOURCE_BEHAVIOR']; + process.env['AZP_TASK_FF_BASHV3_ENABLE_SECURE_ARGS'] = 'false' let tp: string = path.join(__dirname, 'L0Args.js'); let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp); diff --git a/Tasks/BashV3/bash.ts b/Tasks/BashV3/bash.ts index 22992dc18e59..5ffae4428866 100644 --- a/Tasks/BashV3/bash.ts +++ b/Tasks/BashV3/bash.ts @@ -7,8 +7,8 @@ import { processBashEnvVariables } from './bashEnvProcessor'; var uuidV4 = require('uuid/v4'); const featureFlags = { - enableTelemetry: getFeatureFlagValue('AZP_TASK_FF_BASHV3_ENABLE_INPUT_ARGS_TELEMETRY'), - enableSecureArgs: getFeatureFlagValue('AZP_TASK_FF_BASHV3_ENABLE_SECURE_ARGS') + enableTelemetry: getFeatureFlagValue('AZP_TASK_FF_BASHV3_ENABLE_INPUT_ARGS_TELEMETRY', true), + enableSecureArgs: getFeatureFlagValue('AZP_TASK_FF_BASHV3_ENABLE_SECURE_ARGS', true) } async function translateDirectoryPath(bashPath: string, directoryPath: string): Promise { @@ -232,10 +232,14 @@ async function run() { } } -function getFeatureFlagValue(featureFlagName: string): boolean { +function getFeatureFlagValue(featureFlagName: string, defaultValue: boolean = false): boolean { const ffValue = process.env[featureFlagName] - return ffValue ? ffValue.toLowerCase() === "true" : false + if (!ffValue) { + return defaultValue + } + + return ffValue.toLowerCase() === "true" } run(); \ No newline at end of file diff --git a/Tasks/BashV3/task.json b/Tasks/BashV3/task.json index 9fc7f5e3673c..3ccf718de906 100644 --- a/Tasks/BashV3/task.json +++ b/Tasks/BashV3/task.json @@ -18,7 +18,7 @@ "version": { "Major": 3, "Minor": 222, - "Patch": 0 + "Patch": 1 }, "releaseNotes": "Script task consistency. Added support for multiple lines and added support for Windows.", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/BashV3/task.loc.json b/Tasks/BashV3/task.loc.json index 85ea4879a7a4..869d83fc4ff1 100644 --- a/Tasks/BashV3/task.loc.json +++ b/Tasks/BashV3/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 3, "Minor": 222, - "Patch": 0 + "Patch": 1 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0",