From b9b7347b8ab274f5d722f8bd7d8e82ceeb7af443 Mon Sep 17 00:00:00 2001 From: Pavel Zwerschke Date: Fri, 12 May 2023 10:13:55 +0200 Subject: [PATCH] Add micromamba list at the end (#65) --- dist/index.js | 11 +++++++++-- package.json | 2 +- src/main.ts | 15 ++++++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 624bf2b..1dad376 100644 --- a/dist/index.js +++ b/dist/index.js @@ -62641,8 +62641,15 @@ var generateInfo = () => { command = execute(micromambaCmd(`info -r ${options.micromambaRootPath}`)); } else { command = determineEnvironmentName(options.environmentName, options.environmentFile).then( - (environmentName) => execute(micromambaCmd(`info -r ${options.micromambaRootPath} -n ${environmentName}`)) - ); + (environmentName) => Promise.all([ + execute(micromambaCmd(`info -r ${options.micromambaRootPath} -n ${environmentName}`)), + Promise.resolve(environmentName) + ]) + ).then(([_exitCode, environmentName]) => { + core5.endGroup(); + core5.startGroup("micromamba list"); + return execute(micromambaCmd(`list -r ${options.micromambaRootPath} -n ${environmentName}`)); + }); } return command.finally(core5.endGroup); }; diff --git a/package.json b/package.json index 0b5660e..98bb069 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-micromamba", - "version": "1.3.0", + "version": "1.4.0", "private": true, "description": "Action to setup micromamba", "scripts": { diff --git a/src/main.ts b/src/main.ts index 9ed6c47..5ec7f36 100644 --- a/src/main.ts +++ b/src/main.ts @@ -98,9 +98,18 @@ const generateInfo = () => { if (!options.createEnvironment) { command = execute(micromambaCmd(`info -r ${options.micromambaRootPath}`)) } else { - command = determineEnvironmentName(options.environmentName, options.environmentFile).then((environmentName) => - execute(micromambaCmd(`info -r ${options.micromambaRootPath} -n ${environmentName}`)) - ) + command = determineEnvironmentName(options.environmentName, options.environmentFile) + .then((environmentName) => + Promise.all([ + execute(micromambaCmd(`info -r ${options.micromambaRootPath} -n ${environmentName}`)), + Promise.resolve(environmentName) + ]) + ) + .then(([_exitCode, environmentName]) => { + core.endGroup() + core.startGroup('micromamba list') + return execute(micromambaCmd(`list -r ${options.micromambaRootPath} -n ${environmentName}`)) + }) } return command.finally(core.endGroup) }