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
Cette révision appartient à :
Jiadong Zhu
2024-05-22 10:46:09 +08:00
révisé par David Yat Sin
Parent 29dfe7d0fc
révision d1efacb47f
+1 -1
Voir le fichier
@@ -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;