From 0aaa0e4e46ceca28e227dc93ddbf56702b0e4b71 Mon Sep 17 00:00:00 2001 From: Pavel Zwerschke Date: Sun, 23 Jul 2023 00:02:23 +0000 Subject: [PATCH] Fix root prefix init (#107) --- .github/workflows/test.yml | 4 ++-- dist/index.js | 3 +-- dist/post.js | 3 +-- src/shell-init.ts | 6 ++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0986b1d..d700ca4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: diff --git a/dist/index.js b/dist/index.js index 5447c60..d0bad88 100644 --- a/dist/index.js +++ b/dist/index.js @@ -65334,8 +65334,7 @@ var copyMambaInitBlockToBashProfile = () => { var shellInit = (shell) => { core4.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 (os4.platform() === "linux" && shell === "bash") { return command.then(copyMambaInitBlockToBashProfile).finally(core4.endGroup); diff --git a/dist/post.js b/dist/post.js index e7d7d23..f57678c 100644 --- a/dist/post.js +++ b/dist/post.js @@ -64370,8 +64370,7 @@ var removeMambaInitBlockFromBashProfile = () => { var shellDeinit = (shell) => { core4.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 (os4.platform() === "linux" && shell === "bash") { return command.then(removeMambaInitBlockFromBashProfile).finally(core4.endGroup); diff --git a/src/shell-init.ts b/src/shell-init.ts index 7aa8efc..b3e89d3 100644 --- a/src/shell-init.ts +++ b/src/shell-init.ts @@ -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) @@ -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)