Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip adding default remotes if CONAN_NO_DEFAULT_REMOTES is set to True/1 #15674

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conans/client/cache/remote_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from conans.errors import ConanException, NoRemoteAvailable
from conans.util.config_parser import get_bool_from_text_value
from conans.util.env_reader import get_env
from conans.util.files import load, save
from conans.model.ref import PackageReference, ConanFileReference

Expand Down Expand Up @@ -320,6 +321,8 @@ def reset_remotes(self):
self.initialize_remotes()

def load_remotes(self):
if not os.path.exists(self._filename) and get_env("CONAN_NO_DEFAULT_REMOTES", False):
return Remotes.loads("{}")
self.initialize_remotes()
content = load(self._filename)
return Remotes.loads(content)
Expand Down