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
[ROCm/rocminfo commit: d1efacb47f]
This commit is contained in:
committed by
David Yat Sin
parent
77e5febbc5
commit
33cb32bf97
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user