Skip to content

Commit 191052a

Browse files
authored
Update npmauth to handle retries cleanly (#15962)
1 parent f8f9ea5 commit 191052a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Tasks/NpmAuthenticateV0/npmauth.ts

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ async function main(): Promise<void> {
118118
main().catch(error => {
119119
if(tl.getVariable("NPM_AUTHENTICATE_TEMP_DIRECTORY")) {
120120
tl.rmRF(tl.getVariable("NPM_AUTHENTICATE_TEMP_DIRECTORY"));
121+
// Clear the variables after we rm-rf the main root directory
122+
tl.setVariable("SAVE_NPMRC_PATH", "", false);
123+
tl.setVariable("NPM_AUTHENTICATE_TEMP_DIRECTORY", "", false);
121124
}
122125
tl.setResult(tl.TaskResult.Failed, error);
123126
});

Tasks/NpmAuthenticateV0/task.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 198,
12+
"Minor": 200,
1313
"Patch": 0
1414
},
1515
"runsOn": [

Tasks/NpmAuthenticateV0/task.loc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 198,
12+
"Minor": 200,
1313
"Patch": 0
1414
},
1515
"runsOn": [

0 commit comments

Comments
 (0)