Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download-externals script throws exception #104

Open
machawk1 opened this issue Feb 3, 2019 · 0 comments
Open

Download-externals script throws exception #104

machawk1 opened this issue Feb 3, 2019 · 0 comments

Comments

@machawk1
Copy link

machawk1 commented Feb 3, 2019

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant