diff --git a/Tasks/AzurePowerShellV5/azurepowershell.ts b/Tasks/AzurePowerShellV5/azurepowershell.ts index 6c70b7c976e7..b08ac8a6aadc 100644 --- a/Tasks/AzurePowerShellV5/azurepowershell.ts +++ b/Tasks/AzurePowerShellV5/azurepowershell.ts @@ -19,9 +19,9 @@ async function run() { const env = process.env; const hostEnv = `ADO/AzurePowerShell@v5_${env.AGENT_OS || ""}_${env.AGENT_NAME || ""}_${env.BUILD_DEFINITIONNAME || ""}_${env.BUILD_BUILDID || ""}_${env.RELEASE_DEFINITIONNAME || ""}_${env.RELEASE_RELEASEID || ""}`; - + process.env.AZUREPS_HOST_ENVIRONMENT = hostEnv; - console.log(`AZUREPS_HOST_ENVIRONMENT: ${hostEnv}`); + console.log(`AZUREPS_HOST_ENVIRONMENT: ${hostEnv}`); try { tl.setResourcePath(path.join(__dirname, 'task.json')); @@ -37,6 +37,7 @@ async function run() { throw new Error(tl.loc('JS_InvalidErrorActionPreference', _vsts_input_errorActionPreference)); } + let scriptType: string = tl.getInput('ScriptType', /*required*/true); let scriptPath = convertToNullIfUndefined(tl.getPathInput('ScriptPath', false)); let scriptInline: string = convertToNullIfUndefined(tl.getInput('Inline', false)); @@ -207,7 +208,7 @@ async function run() { async function getInstalledAzModuleVersion(): Promise { try { tl.debug('Checking installed Az PowerShell module version...'); - + // PowerShell command to get the installed Az module version const powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)) .arg('-NoLogo') @@ -217,7 +218,7 @@ async function getInstalledAzModuleVersion(): Promise { .arg('Unrestricted') .arg('-Command') .arg(`. '${path.join(path.resolve(__dirname),'Utility.ps1')}'; Get-InstalledMajorRelease -moduleName 'Az' -iswin $false`); - + const result = await powershell.execSync() if (result.code === 0 && result.stdout) { const version = result.stdout.trim(); diff --git a/Tasks/AzurePowerShellV5/task.json b/Tasks/AzurePowerShellV5/task.json index 448277fc3bf8..8ddc27eca8b3 100644 --- a/Tasks/AzurePowerShellV5/task.json +++ b/Tasks/AzurePowerShellV5/task.json @@ -17,7 +17,7 @@ "author": "Microsoft Corporation", "version": { "Major": 5, - "Minor": 260, + "Minor": 261, "Patch": 0 }, "releaseNotes": "Added support for Az Module and cross platform agents.", diff --git a/Tasks/AzurePowerShellV5/task.loc.json b/Tasks/AzurePowerShellV5/task.loc.json index 0ed2997cf850..71fe332f3e12 100644 --- a/Tasks/AzurePowerShellV5/task.loc.json +++ b/Tasks/AzurePowerShellV5/task.loc.json @@ -17,7 +17,7 @@ "author": "Microsoft Corporation", "version": { "Major": 5, - "Minor": 260, + "Minor": 261, "Patch": 0 }, "releaseNotes": "ms-resource:loc.releaseNotes", diff --git a/package-lock.json b/package-lock.json index 44996048a264..72d2c8a4a427 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "@types/adm-zip": "^0.4.34", "@types/minimatch": "^3.0.2", "@types/minimist": "^1.2.5", - "@types/node": "^20.19.9", "@types/semver": "^5.5.0", "@types/shelljs": "^0.8.17", "@types/validator": "^13.15.2", diff --git a/package.json b/package.json index 1ab0c2432966..e3aecafb09fc 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ "@types/adm-zip": "^0.4.34", "@types/minimatch": "^3.0.2", "@types/minimist": "^1.2.5", - "@types/node": "^20.19.9", "@types/semver": "^5.5.0", "@types/shelljs": "^0.8.17", "@types/validator": "^13.15.2",