File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,6 @@ branding:
3939 color : ' blue'
4040runs :
4141 using : ' node20'
42- pre : ' lib/cleanup/index.js'
4342 main : ' lib/main/index.js'
43+ post-if : (!env.AZURE_LOGIN_POST_CLEANUP || env.AZURE_LOGIN_POST_CLEANUP != 'false')
4444 post : ' lib/cleanup/index.js'
Original file line number Diff line number Diff line change 11import * as core from '@actions/core' ;
2- import { setUserAgent } from './common/Utils' ;
2+ import { cleanupAzCLIAccounts , cleanupAzPSAccounts , setUserAgent } from './common/Utils' ;
33import { AzPSLogin } from './PowerShell/AzPSLogin' ;
44import { LoginConfig } from './common/LoginConfig' ;
55import { AzureCliLogin } from './Cli/AzureCliLogin' ;
66
77async function main ( ) {
88 try {
99 setUserAgent ( ) ;
10+ const preCleanup : string = process . env . AZURE_LOGIN_PRE_CLEANUP ;
11+ if ( 'true' == preCleanup ) {
12+ await cleanupAzCLIAccounts ( ) ;
13+ if ( core . getInput ( 'enable-AzPSSession' ) . toLowerCase ( ) === "true" ) {
14+ await cleanupAzPSAccounts ( ) ;
15+ }
16+ }
1017
1118 // prepare the login configuration
1219 var loginConfig = new LoginConfig ( ) ;
You can’t perform that action at this time.
0 commit comments