diff --git a/src/shell-init.ts b/src/shell-init.ts index 29ad0f5..6ddd6f0 100644 --- a/src/shell-init.ts +++ b/src/shell-init.ts @@ -40,7 +40,12 @@ 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) + if (existsSync(mambaBat)) { + return fs.copyFile(mambaBat, micromambaBat) + } + else { + return Promise.resolve(undefined) + } } export const shellInit = (options: Options, shell: string) => {