diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2015-06-25 23:14:05 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2015-06-29 09:08:44 +0000 |
commit | c96729c318de6385a5afe6db0769b750acf5c157 (patch) | |
tree | b0f142ecdc25ef3f176658420468ea0da0bb34b7 /share/qbs/modules/typescript | |
parent | 69eaf2d6fd1c6ded5b2483f8903f4d6512c1d93d (diff) | |
download | qbs-c96729c318de6385a5afe6db0769b750acf5c157.tar.gz |
Make TypeScript autodetection work on Windows.
\r\n strikes again...
Additionally, make the prefix matching a little stricter.
This will work with all TypeScript versions released so far.
Change-Id: I5fff00fde7f036b03d769ffc8f4483ccdde92a25
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'share/qbs/modules/typescript')
-rw-r--r-- | share/qbs/modules/typescript/TypeScriptModule.qbs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/qbs/modules/typescript/TypeScriptModule.qbs b/share/qbs/modules/typescript/TypeScriptModule.qbs index 6d499bc82..dac9c9d14 100644 --- a/share/qbs/modules/typescript/TypeScriptModule.qbs +++ b/share/qbs/modules/typescript/TypeScriptModule.qbs @@ -108,7 +108,8 @@ Module { var p = new Process(); try { p.exec(compilerPath, ["--version"]); - var match = p.readStdOut().match(/.*\bVersion (([0-9]+(?:\.[0-9]+){1,3})(?:-(.+?))?)\n$/); + var re = /^(?:message TS6029: )?Version (([0-9]+(?:\.[0-9]+){1,3})(?:-(.+?))?)$/m; + var match = p.readStdOut().match(re); if (match !== null) return match; } finally { |