evshiron / nwjs-builder

https://www.npmjs.com/package/nwjs-builder
76 stars 12 forks source link

Mirror #24

Closed stackmagic closed 8 years ago

stackmagic commented 8 years ago

Alright so I redid this from scratch because It was easier than merging with your latest changes

stackmagic commented 8 years ago

The stacktraces don't point to the actual cause. All I could find out so far from poking around a bit that it fails if it's a "-sdk" version and no mirror was specified. From looking at the code, it doesn't make sense.

evshiron commented 8 years ago

Strange build failure. I will look into it.

stackmagic commented 8 years ago

I don't understand half the code anyway, what is this cb.expect??? does that number need to be incremented since I added the mirror there?

            [err, , , binaryDir] = yield NWB.DownloadAndExtractBinary({
                version: this.version,
                platform: platform,
                arch: arch,
                flavor: this.flavor,
                mirror: this.mirror
            }, cb.expect(4));
evshiron commented 8 years ago

@stackmagic That's from evshiron/node-flow. The cb.expect(4) means the callback should expect 4 arguments (and if there are less than 4 arguments, it fills the array), so that the return value can be safely destructured. BTW I have found the problem, it's from evshiron/nwjs-download.

stackmagic commented 8 years ago

I just checked your commit on nwjs-download... so this works with booleans but nothing else? I mean 1 line below there's showProgressbar = false

And the build just passed! Thanks!

evshiron commented 8 years ago

I don't know either, maybe explicit specifying an undefined overwrites the default value too.