Do not print to console for which command

The command which would print warnings on some
platform. Redirect both stdout and stderr to
/dev/null while running the command.

Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Change-Id: Ibc377681a31a14a3e306ab4fcb14d8d0c853fa86
Šī revīzija ir iekļauta:
Jiadong Zhu authored and David Yat Sin committed 2024-05-22 09:43:21 -04:00
1 vecāks 29dfe7d0fc
revīzija d1efacb47f
1 file changed
+1 -1
+1 -1
Parādīt failu
@@ -248,7 +248,7 @@ pair<string, int> exec(const char* cmd) {
}
static void DetectWSLEnvironment() {
auto process_ret = exec("which wslinfo");
auto process_ret = exec("which wslinfo > /dev/null 2>&1");
if (process_ret.second)
return;