aboutsummaryrefslogtreecommitdiff
path: root/pw_doctor/py/pw_doctor/doctor.py
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2024-03-06 09:29:56 -0800
committerXin Li <delphij@google.com>2024-03-06 09:29:56 -0800
commit646563934a3e2ee26f50171f94d95173a1662e2c (patch)
treec1643be8ab17fc607cea748a8bb1d621a5964873 /pw_doctor/py/pw_doctor/doctor.py
parentb1463ed3bc39c55c2a9496b8332940473fc3c023 (diff)
parent28d03a2a1cabbe01d7bcb6cf5166c10e50d3c2c6 (diff)
downloadpigweed-646563934a3e2ee26f50171f94d95173a1662e2c.tar.gz
Merge Android 14 QPR2 to AOSP main
Bug: 319669529 Merged-In: Icdf552029fb97a34e83c6dd7799433fc473a2506 Change-Id: I193fcbb5c284df7b04c8b6f860a61ffb6f521d37
Diffstat (limited to 'pw_doctor/py/pw_doctor/doctor.py')
-rwxr-xr-xpw_doctor/py/pw_doctor/doctor.py27
1 files changed, 20 insertions, 7 deletions
diff --git a/pw_doctor/py/pw_doctor/doctor.py b/pw_doctor/py/pw_doctor/doctor.py
index cf3f8651f..3e10a7ecd 100755
--- a/pw_doctor/py/pw_doctor/doctor.py
+++ b/pw_doctor/py/pw_doctor/doctor.py
@@ -28,6 +28,7 @@ from typing import Callable, Iterable, List, Optional, Set
import pw_cli.pw_command_plugins
import pw_env_setup.cipd_setup.update as cipd_update
+from pw_env_setup import config_file
def call_stdout(*args, **kwargs):
@@ -210,11 +211,19 @@ def pw_root(ctx: DoctorContext):
)
git_root = git_root.resolve()
if root != git_root:
- ctx.error(
- 'PW_ROOT (%s) != `git rev-parse --show-toplevel` (%s)',
- root,
- git_root,
- )
+ if str(root).lower() != str(git_root).lower():
+ ctx.error(
+ 'PW_ROOT (%s) != `git rev-parse --show-toplevel` (%s)',
+ root,
+ git_root,
+ )
+ else:
+ ctx.warning(
+ 'PW_ROOT (%s) differs in case from '
+ '`git rev-parse --show-toplevel` (%s)',
+ root,
+ git_root,
+ )
@register_into(CHECKS)
@@ -483,6 +492,9 @@ def symlinks(ctx: DoctorContext):
def run_doctor(strict=False, checks=None):
"""Run all the Check subclasses defined in this file."""
+ config = config_file.load().get('pw', {}).get('pw_doctor', {})
+ new_bug_url = config.get('new_bug_url', 'https://issues.pigweed.dev/new')
+
if checks is None:
checks = tuple(CHECKS)
@@ -496,8 +508,9 @@ def run_doctor(strict=False, checks=None):
doctor.log.info(
"Your environment setup has completed, but something isn't right "
'and some things may not work correctly. You may continue with '
- 'development, but please seek support at '
- 'https://issues.pigweed.dev/new or by reaching out to your team.'
+ 'development, but please seek support at %s or by '
+ 'reaching out to your team.',
+ new_bug_url,
)
else:
doctor.log.info('Environment passes all checks!')