Skip to content

Commit

Permalink
Only warn on frozen conan v1 remote if enabled (#17482)
Browse files Browse the repository at this point in the history
only warn when not disabled
  • Loading branch information
czoido authored Dec 18, 2024
1 parent fcb2bc0 commit 5d61faf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conan/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def _warn_python_version():
def _warn_frozen_center(conan_api):
remotes = conan_api.remotes.list()
for r in remotes:
if r.url == "https://center.conan.io":
if r.url == "https://center.conan.io" and not r.disabled:
ConanOutput().warning(
"The remote 'https://center.conan.io' is now frozen and has been replaced by 'https://center2.conan.io'. \n"
"Starting from Conan 2.9.2, the default remote is 'center2.conan.io'. \n"
Expand Down
3 changes: 3 additions & 0 deletions test/integration/command/remote_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ def test_using_frozen_center():
c.run("remote update conancenter --url=https://center.conan.io")
assert "The remote 'https://center.conan.io' is now frozen and has been replaced by 'https://center2.conan.io'." in c.out

c.run("remote disable conancenter")
assert "The remote 'https://center.conan.io' is now frozen and has been replaced by 'https://center2.conan.io'." not in c.out


def test_wrong_remotes_json_file():
c = TestClient(light=True)
Expand Down

0 comments on commit 5d61faf

Please sign in to comment.