max-mapper / nugget

minimalist wget clone written in node. HTTP GET files and downloads them into the current directory
BSD 3-Clause "New" or "Revised" License
167 stars 30 forks source link

nugget fails in a Travis CI environment with a memory leak #25

Open kvanbere opened 6 years ago

kvanbere commented 6 years ago

The progress bar does weird stuff and it causes Travis CI to run out of memory when something else calls nugget while in a coverage check with Instanbul, but only when using async Mocha and calling from within a promise.

Don't ask me why or how.

The solution to stop the leak is to make sure opts.quiet is set i.e. my code now looks like:

    var isInCI = process.env.CI !== undefined
    nugget([link], { dir: tmpDir, quiet: isInCI }, function () {
      isFunction(onDone) && onDone(fullName)
    })

It fails on Linux and OS X images, with all versions of node back to 4.