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 root prefix init #107

Merged
merged 3 commits into from
Jul 23, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
- uses: actions/checkout@v3
- uses: ./
with:
micromamba-version: 1.2.0-1
micromamba-version: 1.4.5-0
environment-file: 'test/environment.yml'
- run: test "$(micromamba --version)" = 1.2.0
- run: test "$(micromamba --version)" = 1.4.5
shell: bash -el {0}

micromamba-shell:
Expand Down
3 changes: 1 addition & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions dist/post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/shell-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ const removeMambaInitBlockFromBashProfile = () => {
export const shellInit = (shell: string) => {
core.startGroup(`Initialize micromamba for ${shell}.`)
const command = execute(
// it should be -r instead of -p, see https://github.com/mamba-org/mamba/issues/2442
micromambaCmd(`shell init -s ${shell} -p ${options.micromambaRootPath}`, options.logLevel, options.condarcFile)
micromambaCmd(`shell init -s ${shell} -r ${options.micromambaRootPath}`, options.logLevel, options.condarcFile)
)
if (os.platform() === 'linux' && shell === 'bash') {
return command.then(copyMambaInitBlockToBashProfile).finally(core.endGroup)
Expand All @@ -51,8 +50,7 @@ export const shellInit = (shell: string) => {
export const shellDeinit = (shell: string) => {
core.startGroup(`Deinitialize micromamba for ${shell}`)
const command = execute(
// it should be -r instead of -p, see https://github.com/mamba-org/mamba/issues/2442
micromambaCmd(`shell deinit -s ${shell} -p ${options.micromambaRootPath}`, options.logLevel, options.condarcFile)
micromambaCmd(`shell deinit -s ${shell} -r ${options.micromambaRootPath}`, options.logLevel, options.condarcFile)
)
if (os.platform() === 'linux' && shell === 'bash') {
return command.then(removeMambaInitBlockFromBashProfile).finally(core.endGroup)
Expand Down