diff options
| author | ruki <[email protected]> | 2024-02-29 00:48:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-02-28 22:56:46 +0800 |
| commit | f86fca0295c477587792ec8955609966790b7dcd (patch) | |
| tree | 4a0a8075bc9a67266bd8b8d0794c3c79721f0284 /xmake/modules/private/utils/executable_path.lua | |
| parent | 5469bf4da989e804f5bae0f4f6d5b93adbd5e2f4 (diff) | |
improve executable_path
Diffstat (limited to 'xmake/modules/private/utils/executable_path.lua')
| -rw-r--r-- | xmake/modules/private/utils/executable_path.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/modules/private/utils/executable_path.lua b/xmake/modules/private/utils/executable_path.lua index f410d9a00..b79927277 100644 --- a/xmake/modules/private/utils/executable_path.lua +++ b/xmake/modules/private/utils/executable_path.lua @@ -50,6 +50,14 @@ function main(program) end end end + -- patch .exe + -- @see https://github.com/xmake-io/xmake/discussions/4781 + if is_host("windows") and path.is_absolute(program) then + local program_exe = program .. ".exe" + if os.isfile(program_exe) then + program = program_exe + end + end if not filepath then filepath = program end |
