From 0f3a1e3e2299f0c11d2a05a3e080255fe2feb1f9 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 2 Jul 2022 11:50:26 +0200 Subject: [PATCH] Remove duplicate code introduced in #440 #440 duplicated a block of code outside of `if (updateEnvironment) {` condition. This was probably an oversight when merging `main` back on the PR branch. The tests should have seen that `core.exportVariable` was being called and should have failed. --- dist/setup/index.js | 9 --------- src/find-python.ts | 11 ----------- 2 files changed, 20 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index f1c0ac3a7..d58c75f38 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -64845,15 +64845,6 @@ function useCpythonVersion(version, architecture, updateEnvironment) { `The list of all available versions can be found here: ${installer.MANIFEST_URL}` ].join(os.EOL)); } - if (utils_1.IS_LINUX) { - const libPath = process.env.LD_LIBRARY_PATH - ? `:${process.env.LD_LIBRARY_PATH}` - : ''; - const pyLibPath = path.join(installDir, 'lib'); - if (!libPath.split(':').includes(pyLibPath)) { - core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath); - } - } const _binDir = binDir(installDir); const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); diff --git a/src/find-python.ts b/src/find-python.ts index 8c085d61a..e1add9533 100644 --- a/src/find-python.ts +++ b/src/find-python.ts @@ -70,17 +70,6 @@ export async function useCpythonVersion( ); } - if (IS_LINUX) { - const libPath = process.env.LD_LIBRARY_PATH - ? `:${process.env.LD_LIBRARY_PATH}` - : ''; - const pyLibPath = path.join(installDir, 'lib'); - - if (!libPath.split(':').includes(pyLibPath)) { - core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath); - } - } - const _binDir = binDir(installDir); const binaryExtension = IS_WINDOWS ? '.exe' : ''; const pythonPath = path.join(