Skip to content

Commit d42f8b8

Browse files
committed
Fix condaBasePath when useBundled is false, and there's no pre-existing conda
1 parent 8874247 commit d42f8b8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Diff for: src/conda.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ import * as utils from "./utils";
1717
* Provide current location of miniconda or location where it will be installed
1818
*/
1919
export function condaBasePath(options: types.IDynamicOptions): string {
20-
let condaPath: string = constants.MINICONDA_DIR_PATH;
21-
if (!options.useBundled) {
22-
if (constants.IS_MAC) {
23-
condaPath = "/Users/runner/miniconda3";
24-
} else {
25-
condaPath += "3";
26-
}
20+
let condaPath: string;
21+
if (options.useBundled) {
22+
condaPath = constants.MINICONDA_DIR_PATH;
23+
} else {
24+
condaPath = path.join(os.homedir(), "miniconda3");
2725
}
2826
return condaPath;
2927
}

0 commit comments

Comments
 (0)