Skip to content

Commit 91c4acc

Browse files
authored
Merge pull request #402 from conda-incubator/auto-activate-base
Workaround for auto_activate_base deprecation
2 parents 7470d07 + 0b3329e commit 91c4acc

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

dist/setup/index.js

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/conda.ts

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,45 @@ export async function applyCondaConfiguration(
240240
options,
241241
);
242242
}
243+
// auto_activate_base was renamed to auto_activate in 25.5.0
244+
core.info(`auto_activate: ${inputs.condaConfig.auto_activate_base}`);
245+
try {
246+
// 25.5.0+
247+
await condaCommand(
248+
[
249+
"config",
250+
"--set",
251+
"auto_activate",
252+
inputs.condaConfig.auto_activate_base,
253+
],
254+
inputs,
255+
options,
256+
);
257+
} catch (err) {
258+
try {
259+
// <25.5.0
260+
await condaCommand(
261+
[
262+
"config",
263+
"--set",
264+
"auto_activate_base",
265+
inputs.condaConfig.auto_activate_base,
266+
],
267+
inputs,
268+
options,
269+
);
270+
} catch (err2) {
271+
core.warning(err2 as Error);
272+
}
273+
}
243274

244275
// All other options are just passed as their string representations
245276
for (const [key, value] of configEntries) {
246277
if (
247278
value.trim().length === 0 ||
248279
key === "channels" ||
249-
key === "pkgs_dirs"
280+
key === "pkgs_dirs" ||
281+
key === "auto_activate_base"
250282
) {
251283
continue;
252284
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy