Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Do not copy old Windows activation script as of 2.0.4 #246

Merged
merged 7 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
environment-file: 'test/environment.yml'
- run: test "$(micromamba --version)" = 1.4.5
shell: bash -el {0}

micromamba-old-version-2:
runs-on: ubuntu-latest
steps:
Expand All @@ -65,7 +65,7 @@ jobs:
environment-file: 'test/environment.yml'
- run: test "$(micromamba --version)" = 1.2.0
shell: bash -el {0}

micromamba-shell:
strategy:
matrix:
Expand Down Expand Up @@ -123,6 +123,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./
with:
micromamba-version: 2.0.2-0
jjerphan marked this conversation as resolved.
Show resolved Hide resolved
init-shell: cmd.exe
environment-file: 'test/environment.yml'
- name: micromamba info (cmd.exe)
Expand Down Expand Up @@ -187,7 +188,7 @@ jobs:
- run: |
micromamba list | grep -q "python 3.11.3 h2755cc3_0_cpython conda-forge"
shell: bash -el {0}

comment-in-environment-file:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 7 additions & 1 deletion src/shell-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ const removeMambaInitBlockFromBashProfile = () => {
const copyMambaBatToMicromambaBat = (options: Options) => {
jjerphan marked this conversation as resolved.
Show resolved Hide resolved
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) && !existsSync(micromambaBat)) {
jjerphan marked this conversation as resolved.
Show resolved Hide resolved
core.info('Copying mamba.bat to micromamba.bat (compatibility with mamba 2.0.2, 2.0.3 and 2.0.4)')
return fs.copyFile(mambaBat, micromambaBat)
} else {
core.info('Not copying mamba.bat to micromamba.bat because it already exists')
}
}

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