From 25cee495a8e6b05278c62f8a4957b12dc6e2cd06 Mon Sep 17 00:00:00 2001 From: Ryan Hendrickson Date: Tue, 6 Dec 2022 10:48:27 -0500 Subject: [PATCH] Delete dubious double-download (#40) * Delete dubious double-download I can't imagine the purpose of this code that starts, and then cancels, a second download in parallel with the first. After recent changes to the internals of dl-tar, the cancellation was no longer effective, and the two download-and-extract processes ended up interfering with each other sometimes. Removing this code seems strictly beneficial; maybe one day I'll regret this but right now I can't see a reason to keep it. * Pin Ubuntu version in CI --- .github/workflows/ci.yml | 2 +- install-purescript/index.js | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 017be26..cd0cf56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ defaults: jobs: build: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-20.04" steps: - uses: "actions/checkout@v3" diff --git a/install-purescript/index.js b/install-purescript/index.js index ab4f3e9..ac6c967 100644 --- a/install-purescript/index.js +++ b/install-purescript/index.js @@ -129,12 +129,6 @@ module.exports = function installPurescript(...args) { return cancelInstallation; } - const tmpSubscription = downloadOrBuildPurescript(options).subscribe({ - error(err) { - observer.error(err); - } - }); - (async () => { const searchCacheValue = { id: 'search-cache', @@ -143,10 +137,6 @@ module.exports = function installPurescript(...args) { const [info] = await Promise.all([ cacache.get.info(cacheRootDir, CACHE_KEY), - (async () => { - await promisify(setImmediate)(); - tmpSubscription.unsubscribe(); - })(), (async () => { let binStat; try {