diff options
| author | ruki <[email protected]> | 2026-07-06 15:34:14 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-06 15:34:14 +0800 |
| commit | 47ac6dbbf4b5e4497d05dabe97cf1910a4f74b2b (patch) | |
| tree | 99bdc3a0444723d07cb3d6f765fd943ee9d9d856 | |
| parent | 15118bd08542be13f8abe9872903a084edd26deb (diff) | |
| parent | 047560d9659f742354ef8be6e3394df2984a17f3 (diff) | |
Merge pull request #7631 from binLep/dev
fix(deb): Avoid passing empty PATH arguments to debuild
| -rw-r--r-- | xmake/plugins/pack/deb/main.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/xmake/plugins/pack/deb/main.lua b/xmake/plugins/pack/deb/main.lua index ebbdb548e..6c0968819 100644 --- a/xmake/plugins/pack/deb/main.lua +++ b/xmake/plugins/pack/deb/main.lua @@ -256,7 +256,18 @@ function _pack_deb(debuild, package) -- build package -- https://github.com/xmake-io/xmake/issues/7626 - os.vrunv(debuild, {"-e", "PATH=" .. (os.getenv("PATH") or ""), "-us", "-uc"}, {curdir = sourcedir}) + local debuild_args = {} + local pathenv = os.getenv("PATH") + + if pathenv and pathenv ~= "" then + table.insert(debuild_args, "-e") + table.insert(debuild_args, "PATH=" .. pathenv) + end + + table.insert(debuild_args, "-us") + table.insert(debuild_args, "-uc") + + os.vrunv(debuild, debuild_args, {curdir = sourcedir}) -- copy deb file os.vcp(path.join(path.directory(sourcedir), "*.deb"), package:outputfile()) |
