-
Notifications
You must be signed in to change notification settings - Fork 12
PR for issue #31: cozy-dev dev:init fails to add the box properly #32
Conversation
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 |
There was a problem hiding this comment.
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?
Thank you @fflorent for this PR. I will test it and merge it tomorrow. |
I have modified the 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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the ~
for?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
Good to merge for me, apparently it's working on my computer. Thanks for the code @fflorent ! |
PR for issue #31: cozy-dev dev:init fails to add the box properly
My pleasure! Florent |
Pull request for issue #31.
Florent