[newauth] Print warning for .gitcookies file

This will print a warning and disable new auth if .gitcookies file
exists.

This ensures we don't break bots once we default new auth on while
pushing human users away from .gitcookies.

Bug: b/404613530
Change-Id: Ia2d05bb7e5d2bf11e5605a26ef492954acbd9833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367723
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
This commit is contained in:
Allen Li
2025-03-19 15:44:36 -07:00
committed by LUCI CQ
parent 4b4ec94b3e
commit 2bfa28f442
2 changed files with 42 additions and 1 deletions

View File

@@ -3902,7 +3902,7 @@ def CMDcreds_check(parser, args):
"""Checks credentials and suggests changes."""
_, _ = parser.parse_args(args)
if newauth.Enabled():
if newauth.EnabledInConfig():
cl = Changelist()
try:
remote_url = cl.GetRemoteUrl()