-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Are you submitting a bug report or a feature request?
Bug in build process.
What is the current behavior?
I am trying to build WAIL-Electron on macOS 10.12.4. One step in resolving dependencies is to npm run download-externals. The downloadMemgator() function appears to be reused to download a JDK.
An issue occurs when https://bitbucket.org/alexkasko/openjdk-unofficial-builds/downloads/openjdk-1.7.0-u80-unofficial-macosx-x86_64-image.zip is passed as the URI parameter to this function.
A regex reads the content-disposition response header, whose value is attachment; filename="openjdk-1.7.0-u80-unofficial-macosx-x86_64-image.zip" for me and the regex a few lines earlier of ['a-zA-z;\s]+=([a-zA-z0-9.-]+) does not match
This causes let name = namrex.exec(res.headers[ 'content-disposition' ])[ 1 ] to fail, as amrex.exec(res.headers[ 'content-disposition' ]) does not produce any matches and the result selection (array element 1) causes the build failure.
What is the expected behavior?
Regex matches, dependency met, build can proceed. This logic of expecting consistent headers from a server is dangerous.
What's your environment?
macOS 10.12.4, , node v10.12.0, WAIL 36edc92 (a relatively recent master)