Skip to content
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