pw_doctor: Relax PW_ROOT check

Relax the check that PW_ROOT is a git repository. Now allow the case
between the two paths to be different without producing an error, only a
warning.

Bug: b/282560789
Change-Id: I5327dcc4a54bdca70ebcbf4b6f9889a6f62e5851
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/147932
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Carlos Chinchilla <cachinchilla@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_doctor/py/pw_doctor/doctor.py b/pw_doctor/py/pw_doctor/doctor.py
index 7c3ae74..494b328 100755
--- a/pw_doctor/py/pw_doctor/doctor.py
+++ b/pw_doctor/py/pw_doctor/doctor.py
@@ -211,11 +211,19 @@
     )
     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)