Use needle consistently

and remove unused variable
This commit is contained in:
David Baker 2020-02-21 18:25:33 +00:00
parent b94c52c244
commit 0c28d1bfb2

View File

@ -81,7 +81,7 @@ async function downloadToFile(url, filename) {
console.log("Downloading " + url + "..."); console.log("Downloading " + url + "...");
try { try {
const bob = await needle('get', url, null, await needle('get', url, null,
{ {
follow_max: 5, follow_max: 5,
output: filename, output: filename,
@ -184,14 +184,7 @@ async function main() {
} }
resolve(!error); resolve(!error);
}); });
https.get(PUB_KEY_URL, (resp) => { needle.get(PUB_KEY_URL).pipe(gpgProc.stdin);
resp.on('data', (chunk) => {
gpgProc.stdin.write(chunk);
});
resp.on('end', (chunk) => {
gpgProc.stdin.end();
});
});
}); });
return 0; return 0;
} }