Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

fix issue with tryPhantomjsInLib on Elastic Beanstalk #590

Merged
merged 2 commits into from
Aug 3, 2016
Merged

fix issue with tryPhantomjsInLib on Elastic Beanstalk #590

merged 2 commits into from
Aug 3, 2016

Conversation

thoop
Copy link
Contributor

@thoop thoop commented Aug 3, 2016

In v2.1.7, tryPhantomjsInLib wouldn't overwrite location.js if phantomjs was found

In v2.1.8, tryPhantomjsInLib would overwrite location.jswith an absolute location if phantomjs was found

This breaks Elastic Beanstalk because they put your app in /tmp/deployment, run npm install and npm rebuild, then move your app to /var/app/current.

The npm rebuild was causing location.js to have an absolute path as the location, which was no longer valid once the app was moved to /var/app/current instead of /tmp/deployment.

The change I made should preserve some of the code cleanup by conditionally overwriting location.js if findValidPhantomJsBinary returns a valid path.

Please bump the patch version after this is merged since it's a breaking change affecting all current Elastic Beanstalk deploys :)

Thanks for your work on this repo!

@thoop
Copy link
Contributor Author

thoop commented Aug 3, 2016

Forgot to mention the issue relating to this PR:

#583

test.done()
})
}

exports.testBogusVerifyChecksum = function (test) {
util.verifyChecksum(path.resolve(__dirname, './exit.js'), 'blargh')
.then(function (success) {
test.ok(!success, 'Expected checksum to fail')
.then(function (binaryLocation) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O.o

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, let me revert that. Thanks for catching it. Changed the wrong test!

@nicks
Copy link
Contributor

nicks commented Aug 3, 2016

thanks for diagnosing this! would you mind filling out a CLA real quick? https://github.com/Medium/opensource/blob/master/sign-cla.md

@thoop
Copy link
Contributor Author

thoop commented Aug 3, 2016

Signed the CLA

@thoop
Copy link
Contributor Author

thoop commented Aug 3, 2016

@nicks mind merging this and bumping the version when you get a chance? Thanks so much!

@nicks nicks merged commit 46af78b into Medium:master Aug 3, 2016
@nicks
Copy link
Contributor

nicks commented Aug 3, 2016

sure, it may take me a little bit to get to it though

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

Successfully merging this pull request may close these issues.

2 participants