Skip to content

Commit

Permalink
Add micromamba list at the end (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored May 12, 2023
1 parent ca12d78 commit b9b7347
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
11 changes: 9 additions & 2 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-micromamba",
"version": "1.3.0",
"version": "1.4.0",
"private": true,
"description": "Action to setup micromamba",
"scripts": {
Expand Down
15 changes: 12 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit b9b7347

Please sign in to comment.