Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Dec 14, 2023
1 parent f4e6669 commit 54366f7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# this should produce a warning
- uses: ./
with:
condarc-file: test/.condarc.2
- run: |
micromamba search pytorch
micromamba info
shell: bash -elo pipefail {0}
# not properly testable
Expand Down
4 changes: 3 additions & 1 deletion dist/index.js

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

4 changes: 3 additions & 1 deletion dist/post.js

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

10 changes: 9 additions & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,15 @@ const checkForKnownIssues = (options: Options) => {
'You are using a micromamba version < 1.4.5-0 and initialize the shell. This is behavior is deprecated. Please update the micromamba version. For further informations, see https://github.com/mamba-org/setup-micromamba/pull/107'
)
}
if (options.condarcFile && path.basename(options.condarcFile) !== '.condarc') {
const condarcBasename = path.basename(options.condarcFile)
const hasValidCondarcName =
condarcBasename === '.condarc' ||
condarcBasename === 'condarc' ||
condarcBasename === '.mambarc' ||
condarcBasename === 'mambarc' ||
condarcBasename.endsWith('.yml') ||
condarcBasename.endsWith('.yaml')
if (!hasValidCondarcName) {
core.warning(
`You are using a condarc file that is not named '.condarc'. This is currently not supported by micromamba, see https://github.com/mamba-org/mamba/issues/1394`
)
Expand Down

0 comments on commit 54366f7

Please sign in to comment.