Skip to content
This repository has been archived by the owner on Apr 9, 2018. It is now read-only.

PR for issue #31: cozy-dev dev:init fails to add the box properly #32

Merged
merged 4 commits into from
Jul 29, 2014

Conversation

fflorent
Copy link
Contributor

Pull request for issue #31.

Florent

@fflorent fflorent changed the title Issue31 PR for issue #31: cozy-dev dev:init fails to add the box properly Jul 21, 2014
@fflorent
Copy link
Contributor Author

Note that I am not sure about the coding style. Do you have some resource so I can conform to it?

Florent

msg = "Cannot correctly check the version using the " + \
"\"vagrant -v\" command. Please report an issue."
console.log msg.red
console.log "Output of \"vagrant -v\": #{stdout}.".red
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a blank line below that one?

@frankrousseau
Copy link
Contributor

Thank you @fflorent for this PR. I will test it and merge it tomorrow.

@fflorent
Copy link
Contributor Author

I have modified the README.md file to add the requirements in fflorent@e2a51bd

Florent


# If the installed version of Vagrant is older than the
# required one, raise an error (see issue #31)
else if ~compareVersions @minimumVagrantVersion, versionMatch[1]
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the ~ for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ~ operator is the "bitwise NOT" operator.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FOperators%2FBitwise_Operators#Bitwise_NOT

It is often used to compare with -1 (~(-1) returns false), especially when using indexOf. I used that trick to be within the 80 chars per-line limitation... May I change that line so the test is clearer?

Florent

Copy link
Contributor

Choose a reason for hiding this comment

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

no, that's okay, i was looking for a coffee operator and didn't think of the javascript one x) my bad!

@jsilvestre
Copy link
Contributor

Good to merge for me, apparently it's working on my computer. Thanks for the code @fflorent !

jsilvestre added a commit that referenced this pull request Jul 29, 2014
PR for issue #31: cozy-dev dev:init fails to add the box properly
@jsilvestre jsilvestre merged commit d96b113 into cozy:master Jul 29, 2014
@fflorent
Copy link
Contributor Author

My pleasure!

Florent

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.

3 participants