Skip to content

Commit

Permalink
Update npmauth to handle retries cleanly (#15914)
Browse files Browse the repository at this point in the history
* Update npmauth.ts

* Update task.json

* Update task.loc.json

* Update npmauth.ts

* RED

Co-authored-by: Your Name <[email protected]>
  • Loading branch information
2 people authored and zhenghao104 committed Feb 19, 2022
1 parent 413fb71 commit e000f49
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": 201,
"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": 201,
"Patch": 0
},
"runsOn": [
Expand Down

0 comments on commit e000f49

Please sign in to comment.