Skip to content

Commit 34ff480

Browse files
authored
Merge pull request webpack#7881 from oygen87/patch-8
refactor
2 parents 58802fa + 1cd8b8b commit 34ff480

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function checkSymlinkExistsAsync() {
4747
}
4848

4949
function ensureYarnInstalledAsync() {
50-
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-]+)*)?$/;
50+
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-]+)*)?$/;
5151
return execGetOutput("yarn", ["-v"], "Check yarn version")
5252
.then(stdout => semverPattern.test(stdout), () => false)
5353
.then(hasYarn => hasYarn || installYarnAsync());

0 commit comments

Comments
 (0)