diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-07-21 10:50:51 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-07-23 07:57:27 +0000 |
commit | 1d2e98101d835bf699984a9770eeb055efcad2c3 (patch) | |
tree | 031bac17bd868cceb4e156790baeb2001ce0b37e | |
parent | 072837660d43b0f83fa9ae405a4c36c0f3aa4519 (diff) |
Fix CONFIG variable being read incorrectly in setup-qt.js
QT_CONFIG was read in the line before CONFIG, and the regex matched it:
QT_CONFIG += private_tests shared shared [...]
CONFIG += shared shared debug sanitize_address sanitizer
This would lead to address sanitizer being ignored and requiring
workarounds.
Use a stricter regex that doesn't allow arbitrary characters before the
key. The regex can be tested manually here:
https://regex101.com/r/aYSWwG/2
Change-Id: I8b6a509d0fdd9500c527497fa3545646f24c42d1
Fixes: QBS-1387
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r-- | share/qbs/module-providers/Qt/setup-qt.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js index f4ec55328..c7b722563 100644 --- a/share/qbs/module-providers/Qt/setup-qt.js +++ b/share/qbs/module-providers/Qt/setup-qt.js @@ -107,7 +107,7 @@ function readFileContent(filePath) { // TODO: Don't do the split every time... function configVariable(configContent, key) { var configContentLines = configContent.split('\n'); - var regexp = new RegExp("\\s*" + key + "\\s*\\+{0,1}=(.*)"); + var regexp = new RegExp("^\\s*" + key + "\\s*\\+{0,1}=(.*)"); for (var i = 0; i < configContentLines.length; ++i) { var line = configContentLines[i]; var match = regexp.exec(line); |