From d42f8b884a951a7e5af53888bd6101e0fd1dc916 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 6 Nov 2023 16:04:59 -0600 Subject: [PATCH] Fix condaBasePath when useBundled is false, and there's no pre-existing conda --- src/conda.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/conda.ts b/src/conda.ts index a17be79f..15f3a1b4 100644 --- a/src/conda.ts +++ b/src/conda.ts @@ -17,13 +17,11 @@ import * as utils from "./utils"; * Provide current location of miniconda or location where it will be installed */ export function condaBasePath(options: types.IDynamicOptions): string { - let condaPath: string = constants.MINICONDA_DIR_PATH; - if (!options.useBundled) { - if (constants.IS_MAC) { - condaPath = "/Users/runner/miniconda3"; - } else { - condaPath += "3"; - } + let condaPath: string; + if (options.useBundled) { + condaPath = constants.MINICONDA_DIR_PATH; + } else { + condaPath = path.join(os.homedir(), "miniconda3"); } return condaPath; }