Skip to content

Commit

Permalink
Update npmauth to handle retries cleanly (#15962)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghao104 authored Feb 23, 2022
1 parent f8f9ea5 commit 191052a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Tasks/NpmAuthenticateV0/npmauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ async function main(): Promise<void> {
main().catch(error => {
if(tl.getVariable("NPM_AUTHENTICATE_TEMP_DIRECTORY")) {
tl.rmRF(tl.getVariable("NPM_AUTHENTICATE_TEMP_DIRECTORY"));
// Clear the variables after we rm-rf the main root directory
tl.setVariable("SAVE_NPMRC_PATH", "", false);
tl.setVariable("NPM_AUTHENTICATE_TEMP_DIRECTORY", "", false);
}
tl.setResult(tl.TaskResult.Failed, error);
});
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NpmAuthenticateV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 198,
"Minor": 200,
"Patch": 0
},
"runsOn": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NpmAuthenticateV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 198,
"Minor": 200,
"Patch": 0
},
"runsOn": [
Expand Down

0 comments on commit 191052a

Please sign in to comment.