diff options
| author | Saikari <[email protected]> | 2026-02-15 23:59:25 +0300 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-02-15 23:59:25 +0300 |
| commit | e7fe0d2de16824d602158e4f7e837a814d95a0a8 (patch) | |
| tree | b9180b5fb86e0baf0ca3f9a574f8855cda2d1114 | |
| parent | fc17a30b0ad0642441dcd5d99c298e145abcc765 (diff) | |
Test for find_program
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_program.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua index 858b413e8..f47e35c02 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua @@ -24,7 +24,7 @@ local sandbox_lib_detect_find_program = sandbox_lib_detect_find_program or {} -- load modules local os = require("base/os") local path = require("base/path") -local option = require("base/winos") +local winos = require("base/winos") local table = require("base/table") local utils = require("base/utils") local option = require("base/option") @@ -40,6 +40,14 @@ local scheduler = require("sandbox/modules/import/core/base/scheduler") -- do check function sandbox_lib_detect_find_program._do_check(program, opt) + -- avoid gcc.exe signed by GIGA-BYTE + if winos.file_signature and program:lower():match("gcc%.exe$") then + local signer = winos.file_signature(program) + if signer and signer.signer and signer.signer:find("GIGA-BYTE", 1, true) then + return false + end + end + -- do not attempt to run program? check it fastly if opt.norun then return os.isfile(program) |
