Skip to content

Commit

Permalink
only apply defaults::x workaround when default_channels is not custom…
Browse files Browse the repository at this point in the history
…ized
  • Loading branch information
jaimergp committed Sep 25, 2023
1 parent 4a53423 commit 6639d1b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions conda_libmamba_solver/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
import libmambapy as api
from boltons.setutils import IndexedSet
from conda import __version__ as _conda_version
from conda.base.constants import REPODATA_FN, UNKNOWN_CHANNEL, ChannelPriority, on_win
from conda.base.constants import (
DEFAULT_CHANNELS,
REPODATA_FN,
UNKNOWN_CHANNEL,
ChannelPriority,
on_win,
)
from conda.base.context import context
from conda.common.constants import NULL
from conda.common.io import Spinner, timeout
Expand Down Expand Up @@ -921,7 +927,10 @@ def _check_spec_compat(self, match_spec: Union[MatchSpec, None]) -> Union[MatchS
f"You can only use {supported}, but you tried to use "
f"{tuple(unsupported_but_set)}.",
)
if match_spec.get_raw_value("channel") == "defaults":
if (
match_spec.get_raw_value("channel") == "defaults"
and context.default_channels == DEFAULT_CHANNELS
):
# !!! Temporary !!!
# Apply workaround for defaults::pkg-name specs.
# We need to replace it with the actual channel name (main, msys2, r)
Expand Down

0 comments on commit 6639d1b

Please sign in to comment.