Skip to content

Commit

Permalink
copy mamba.bat if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Nov 25, 2024
1 parent ab6bf8b commit a4c2412
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/shell-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,17 @@ const removeMambaInitBlockFromBashProfile = () => {
const copyMambaBatToMicromambaBat = (options: Options) => {
const mambaBat = path.join(options.micromambaRootPath, 'condabin', 'mamba.bat')
const micromambaBat = path.join(options.micromambaRootPath, 'condabin', 'micromamba.bat')
return fs.copyFile(mambaBat, micromambaBat)
const existsMamba = existsSync(mambaBat)
const existsMicromamba = existsSync(micromambaBat)
core.info(`==========`)
core.info(`mamba.bat found: ${existsMamba} - micromamba.bat found: ${existsMicromamba}`)
if (existsSync(mambaBat) && !existsSync(micromambaBat)) {
core.info(`calling the copy`)
return fs.copyFile(mambaBat, micromambaBat)
} else {
core.info(`return fulfilled promised`)
return Promise.resolve(undefined)
}
}

export const shellInit = (options: Options, shell: string) => {
Expand Down

0 comments on commit a4c2412

Please sign in to comment.