Skip to content
Permalink
Browse files
Merge pull request #7881 from oygen87/patch-8
refactor
  • Loading branch information
sokra committed Aug 13, 2018
2 parents 58802fa + 1cd8b8b commit 34ff480a92c1848b199fb12c65d6ae28173cebf8
Showing 1 changed file with 1 addition and 1 deletion.
@@ -47,7 +47,7 @@ function checkSymlinkExistsAsync() {
}

function ensureYarnInstalledAsync() {
var semverPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/;
const semverPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/;
return execGetOutput("yarn", ["-v"], "Check yarn version")
.then(stdout => semverPattern.test(stdout), () => false)
.then(hasYarn => hasYarn || installYarnAsync());

0 comments on commit 34ff480

Please sign in to comment.