From 0cc074f1e31253225ae955bb7d3b75b8f61e190a Mon Sep 17 00:00:00 2001 From: binLep Date: Tue, 30 Jun 2026 14:17:34 +0800 Subject: fix(deb): Avoid passing empty PATH arguments to debuild --- xmake/plugins/pack/deb/main.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xmake/plugins/pack/deb/main.lua b/xmake/plugins/pack/deb/main.lua index ebbdb548e..b0b1633ed 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 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()) -- cgit v1.3.1 From 047560d9659f742354ef8be6e3394df2984a17f3 Mon Sep 17 00:00:00 2001 From: binLep <45154147+binLep@users.noreply.github.com> Date: Mon, 6 Jul 2026 10:26:36 +0800 Subject: update(deb): enhance the PATH handling during the installation of deb packages --- xmake/plugins/pack/deb/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/plugins/pack/deb/main.lua b/xmake/plugins/pack/deb/main.lua index b0b1633ed..6c0968819 100644 --- a/xmake/plugins/pack/deb/main.lua +++ b/xmake/plugins/pack/deb/main.lua @@ -259,7 +259,7 @@ function _pack_deb(debuild, package) local debuild_args = {} local pathenv = os.getenv("PATH") - if pathenv then + if pathenv and pathenv ~= "" then table.insert(debuild_args, "-e") table.insert(debuild_args, "PATH=" .. pathenv) end -- cgit v1.3.1