[go: nahoru, domu]

[reclient] Add shell=True for cipd auth-info call on Windows

A Windows user got the following error.
https://paste.googleplex.com/5218136151293952?raw

> src/buildtools/reclient_cfgs/configure_reclient_cfgs.py", line 75, in IsCipdLoggedIn                                                                                                                                                                                                                      ret = subprocess.call(                                                                                                                                                                                                                                                                                      ...                                                                                                                                                                                                                                           FileNotFoundError: [WinError 2] The system cannot find the file specified

This seems to fail to find `cipd.bat` for `cipd auth-info`on Windows.

Change-Id: I377dd06f0d793d01958e1b241dfb98b4e09beb51
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4807460
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1188144}
diff --git a/buildtools/reclient_cfgs/configure_reclient_cfgs.py b/buildtools/reclient_cfgs/configure_reclient_cfgs.py
index 807c60ce..9130ee34 100755
--- a/buildtools/reclient_cfgs/configure_reclient_cfgs.py
+++ b/buildtools/reclient_cfgs/configure_reclient_cfgs.py
@@ -74,6 +74,7 @@
 def IsCipdLoggedIn():
     ret = subprocess.call(
        ['cipd', 'auth-info'],
+       shell=True,
        stderr=subprocess.PIPE,
        stdout=subprocess.DEVNULL)
     return ret == 0