From cefad271b8dea6b5774d1ae05d9a11cdf37f3b96 Mon Sep 17 00:00:00 2001 From: Narendra Singh Kushwah <158804600+kmjtechno@users.noreply.github.com> Date: Mon, 9 Nov 2026 18:07:25 +0530 Subject: [PATCH 1/2] fix(jobs): fail closed on empty CMake prefix path entries --- src/jobs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jobs.js b/src/jobs.js index 341b701c..554a1d0d 100644 --- a/src/jobs.js +++ b/src/jobs.js @@ -106,7 +106,7 @@ export function jobEnvironment( const value = source.CMAKE_PREFIX_PATH; const parts = typeof value === "string" && value.length <= 4096 - ? value.split(";").filter((part) => part.length > 0) + ? value.split(";") : []; if ( parts.length > 0 && From 3f67edf05885fb57134d99784bfc868d39002ed3 Mon Sep 17 00:00:00 2001 From: Narendra Singh Kushwah <158804600+kmjtechno@users.noreply.github.com> Date: Mon, 9 Nov 2026 18:07:31 +0530 Subject: [PATCH 2/2] test(jobs): reject leading trailing and interior empty CMake entries --- tests/windows-job-environment.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/windows-job-environment.test.js b/tests/windows-job-environment.test.js index a65dae7e..d6f6e41f 100644 --- a/tests/windows-job-environment.test.js +++ b/tests/windows-job-environment.test.js @@ -126,6 +126,9 @@ test("CMAKE_PREFIX_PATH is inherited only by approved cmake commands and only wh "C:\\Qt" + String.fromCharCode(10) + "x", "C:\\" + "a".repeat(5000), ";;", + ";C:\\Qt", + "C:\\Qt;", + "C:\\Qt;;D:\\libs", ]) { assert.equal( Object.hasOwn(