Skip to content

Commit

Permalink
Delete dubious double-download (#40)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
rhendric authored Dec 6, 2022
1 parent 5c129a4 commit 25cee49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defaults:

jobs:
build:
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
steps:
- uses: "actions/checkout@v3"

Expand Down
10 changes: 0 additions & 10 deletions install-purescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 {
Expand Down

0 comments on commit 25cee49

Please sign in to comment.