pw_ide: Fix condition for Windows platform

The current CIPD exe lookup uses a incorrect condition to check if the
underlying platform is Windows or not. The condition checks for "win"
substr, which accidentally included "darwin" as in macOS.

This change replaces the "win" substr check with strict matching of
("win32", "cygwin"). Reference:
https://docs.python.org/3/library/sys.html#sys.platform.

Change-Id: Ia8a0cba20200e50718522a4763cf8c03ea6e9b06
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/184730
Reviewed-by: Chad Norvell <chadnorvell@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Chad Norvell <chadnorvell@google.com>
diff --git a/pw_ide/py/cpp_test_fake_env.py b/pw_ide/py/cpp_test_fake_env.py
index 0035b93..747b28b 100644
--- a/pw_ide/py/cpp_test_fake_env.py
+++ b/pw_ide/py/cpp_test_fake_env.py
@@ -85,7 +85,7 @@
 
     def touch_temp_exe_file(self, exe_path: Path) -> Path:
         """Create a temporary executable file given a path."""
-        if "win" in sys.platform.lower():
+        if sys.platform.lower() in ("win32", "cygwin"):
             exe_path = Path(str(exe_path) + ".exe")
 
         file_path = self.temp_dir_path / exe_path
diff --git a/pw_ide/py/pw_ide/cpp.py b/pw_ide/py/pw_ide/cpp.py
index 51a072a..3d758e0 100644
--- a/pw_ide/py/pw_ide/cpp.py
+++ b/pw_ide/py/pw_ide/cpp.py
@@ -1139,7 +1139,7 @@
     `PW_<PROJ_NAME>_CIPD_INSTALL_DIR` environment variables.
     """
 
-    if "win" in sys.platform.lower():
+    if sys.platform.lower() in ("win32", "cygwin"):
         exe += ".exe"
 
     env_vars = vars(env)