Skip to content

Commit 3022b5c

Browse files
committed
Fix: Make regex more simple
1 parent 6f259b5 commit 3022b5c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/cmake-tools/scanner.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ local function get_gcc_version(gcc_path)
4646
return nil
4747
end
4848
-- Try multiple patterns to match different gcc output formats
49-
local version = output:match("gcc%s+%(GCC%)%s+([%d%.]+)") -- "gcc (GCC) 15.2.1"
49+
local version = output:match("gcc[%s%a]([%d%.]+)") -- "gcc (GCC) 15.2.1"
5050
or output:match("gcc version ([%d%.]+)") -- "gcc version 11.4.0"
5151
return version
5252
end

0 commit comments

Comments
 (0)