Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kiryl1 authored Jul 12, 2022
1 parent d1c7924 commit 4e827d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ async function updateDep(FILE_NAME, tag_name, repo, owner) {

if (response.statusCode > 300 && response.statusCode < 400 && response.headers.location) {
if (url.parse(response.headers.location).hostname) {
https.get(response.headers.location,(response)=> {writeToFile(response,FILE_NAME,path)});
https.get(response.headers.location,(response)=> {writeToS3(response,FILE_NAME,path)});
} else {
https.get(url.resolve(url.parse(TAR_URL).hostname, response.headers.location), (response)=> {writeToFile(response,FILE_NAME,path)});
https.get(url.resolve(url.parse(TAR_URL).hostname, response.headers.location), (response)=> {writeToS3(response,FILE_NAME,path)});
}
} else {
writeToFile(response,FILE_NAME,path);
writeToS3(response,FILE_NAME,path);
}
});

Expand Down

0 comments on commit 4e827d3

Please sign in to comment.