@@ -19,9 +19,9 @@ async function run() {
19
19
20
20
const env = process . env ;
21
21
const hostEnv = `ADO/AzurePowerShell@v5_${ env . AGENT_OS || "" } _${ env . AGENT_NAME || "" } _${ env . BUILD_DEFINITIONNAME || "" } _${ env . BUILD_BUILDID || "" } _${ env . RELEASE_DEFINITIONNAME || "" } _${ env . RELEASE_RELEASEID || "" } ` ;
22
-
22
+
23
23
process . env . AZUREPS_HOST_ENVIRONMENT = hostEnv ;
24
- console . log ( `AZUREPS_HOST_ENVIRONMENT: ${ hostEnv } ` ) ;
24
+ console . log ( `AZUREPS_HOST_ENVIRONMENT: ${ hostEnv } ` ) ;
25
25
26
26
try {
27
27
tl . setResourcePath ( path . join ( __dirname , 'task.json' ) ) ;
@@ -37,6 +37,7 @@ async function run() {
37
37
throw new Error ( tl . loc ( 'JS_InvalidErrorActionPreference' , _vsts_input_errorActionPreference ) ) ;
38
38
}
39
39
40
+
40
41
let scriptType : string = tl . getInput ( 'ScriptType' , /*required*/ true ) ;
41
42
let scriptPath = convertToNullIfUndefined ( tl . getPathInput ( 'ScriptPath' , false ) ) ;
42
43
let scriptInline : string = convertToNullIfUndefined ( tl . getInput ( 'Inline' , false ) ) ;
@@ -207,7 +208,7 @@ async function run() {
207
208
async function getInstalledAzModuleVersion ( ) : Promise < string | null > {
208
209
try {
209
210
tl . debug ( 'Checking installed Az PowerShell module version...' ) ;
210
-
211
+
211
212
// PowerShell command to get the installed Az module version
212
213
const powershell = tl . tool ( tl . which ( 'pwsh' ) || tl . which ( 'powershell' ) || tl . which ( 'pwsh' , true ) )
213
214
. arg ( '-NoLogo' )
@@ -217,7 +218,7 @@ async function getInstalledAzModuleVersion(): Promise<string | null> {
217
218
. arg ( 'Unrestricted' )
218
219
. arg ( '-Command' )
219
220
. arg ( `. '${ path . join ( path . resolve ( __dirname ) , 'Utility.ps1' ) } '; Get-InstalledMajorRelease -moduleName 'Az' -iswin $false` ) ;
220
-
221
+
221
222
const result = await powershell . execSync ( )
222
223
if ( result . code === 0 && result . stdout ) {
223
224
const version = result . stdout . trim ( ) ;
0 commit comments