Skip to content

Commit

Permalink
use basename
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Oct 1, 2024
1 parent c773066 commit fbc1b51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47063,8 +47063,9 @@ exports.updateMamba = {
postInstall: (inputs, options) => __awaiter(void 0, void 0, void 0, function* () {
const mambaBat = conda.condaExecutable(options).replace(/\\/g, "/");
if (!mambaBat.includes("condabin")) {
const condabinLocation = path.join(conda.condaBasePath(options), "condabin", `mamba${constants.IS_WINDOWS ? ".bat" : ""}`);
const condabinLocation = path.join(conda.condaBasePath(options), "condabin", path.basename(mambaBat));
if (!fs.existsSync(condabinLocation)) {
core.info("Copying `mamba` to condabin/");
fs.copyFileSync(mambaBat, condabinLocation);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/base-tools/update-mamba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ export const updateMamba: types.IToolProvider = {
const condabinLocation = path.join(
conda.condaBasePath(options),
"condabin",
`mamba${constants.IS_WINDOWS ? ".bat" : ""}`,
path.basename(mambaBat),
);
if (!fs.existsSync(condabinLocation)) {
core.info("Copying `mamba` to condabin/");
fs.copyFileSync(mambaBat, condabinLocation);
}
}
Expand Down

0 comments on commit fbc1b51

Please sign in to comment.