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
Этот коммит содержится в:
Jiadong Zhu
2024-05-22 10:46:09 +08:00
коммит произвёл David Yat Sin
родитель 29dfe7d0fc
Коммит d1efacb47f
+1 -1
Просмотреть файл
@@ -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;