From 74f0355d8a0be644451ab2de460537bcae1de4c7 Mon Sep 17 00:00:00 2001 From: Ritesh Raj Sarraf Date: Fri, 12 Oct 2018 20:56:43 +0530 Subject: Replace `whoami` with a more generic command In our docker environment, the normal user does not have a name. This results in the `whoami` command to fail which expects a name to print Replace `whoami` with `id -u`, which print print the numeric id I have no name!@7427761b8f4c:/tmp/d$ whoami whoami: cannot find name for user ID 1000 I have no name!@7427761b8f4c:/tmp/d$ id uid=1000 gid=0(root) groups=0(root) Signed-off-by: Ritesh Raj Sarraf --- src/subprocess_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subprocess_test.cc b/src/subprocess_test.cc index 0a8c206..6e487db 100644 --- a/src/subprocess_test.cc +++ b/src/subprocess_test.cc @@ -182,7 +182,7 @@ TEST_F(SubprocessTest, SetWithMulti) { "cmd /c echo hi", "cmd /c time /t", #else - "whoami", + "id -u", "pwd", #endif }; -- cgit v0.12