Skip to content

Commit a4ecd04

Browse files
committed
test: preserve system path on posix runners
1 parent bb27eed commit a4ecd04

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/installer-runtime.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,11 @@ function createPosixHarness(temp, architecture = posixArchitecture, system = pos
250250

251251
function posixInstallerEnv(base, harness, publicKeyPath, version = '') {
252252
const posixShimDir = toPosixPath(harness.shimDir);
253+
const executablePath = process.platform === 'win32'
254+
? `${posixShimDir}:/mingw64/bin:/usr/bin`
255+
: `${posixShimDir}:${process.env.PATH || '/usr/local/bin:/usr/bin:/bin'}`;
253256
return {
254-
PATH: `${posixShimDir}:/mingw64/bin:/usr/bin`,
257+
PATH: executablePath,
255258
MSYS2_ENV_CONV_EXCL: 'PATH',
256259
HOME: toPosixPath(path.dirname(harness.installDir)),
257260
CONTEXA_VERSION: version ? `v${version}` : '',

0 commit comments

Comments
 (0)