-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/azure-pipelines-tool-lib/tool.js b/node_modules/azure-pipelines-tool-lib/tool.js
index 48afe82..911bc89 100644
--- a/node_modules/azure-pipelines-tool-lib/tool.js
+++ b/node_modules/azure-pipelines-tool-lib/tool.js
@@ -234,11 +234,6 @@ function downloadTool(url, fileName, handlers, additionalHeaders) {
.on('error', (err) => {
file.end();
reject(err);
- })
- .on('aborted', () => {
- // this block is for Node10 compatibility since it doesn't emit 'error' event after 'aborted' one
- file.end();
- reject(new Error('Aborted'));
})
.pipe(file);
}
This issue body was partially generated by patch-package.
I was working on updating the dependency of my packerTool
task and found out that for every test run the download would fail with the dreaded Aborted
error. By patching your package it was consequently solved.
The event is also already deprecated for a while: https://nodejs.org/api/http.html#event-abort
Pretty sure it will fix these issues: microsoft/azure-pipelines-tasks#18280
Metadata
Metadata
Assignees
Labels
No labels