Skip to content

Commit

Permalink
Fix root prefix init (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Jul 23, 2023
1 parent 5b9dc5c commit 0aaa0e4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
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

0 comments on commit 0aaa0e4

Please sign in to comment.