summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/qbs/modules/qbs/common.qbs18
1 files changed, 10 insertions, 8 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs
index ee2fd49c9..73f2c5add 100644
--- a/share/qbs/modules/qbs/common.qbs
+++ b/share/qbs/modules/qbs/common.qbs
@@ -65,15 +65,17 @@ Module {
"You must use the canonical name '" + canonicalArch + "'";
}
- if ((hostOS.contains("windows") || hostOS.contains("osx")) && !hostOSVersion) {
- throw "Could not detect host operating system version; " +
- "verify that system files or registry have not been " +
- "tampered with.";
- }
+ if (hostOS.contains("windows") || hostOS.contains("osx")) {
+ if (!hostOSVersion) {
+ throw "Could not detect host operating system version; " +
+ "verify that system files or registry have not been " +
+ "tampered with.";
+ }
- if (!/^[0-9]+(\.[0-9]+){1,3}$/.test(hostOSVersion)) {
- throw "qbs.hostOSVersion is in an invalid format; it must be of the form x.y or " +
- "x.y.z or x.y.z.w where x, y, z and w are positive integers.";
+ if (!/^[0-9]+(\.[0-9]+){1,3}$/.test(hostOSVersion)) {
+ throw "qbs.hostOSVersion is in an invalid format; it must be of the form x.y or " +
+ "x.y.z or x.y.z.w where x, y, z and w are positive integers.";
+ }
}
}
}