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 <ritesh.sarraf@collabora.com>
This commit is contained in:
Ritesh Raj Sarraf 2018-10-12 20:56:43 +05:30
parent ca041d88f4
commit 74f0355d8a
No known key found for this signature in database
GPG Key ID: A63A58A3F2E17569

View File

@ -182,7 +182,7 @@ TEST_F(SubprocessTest, SetWithMulti) {
"cmd /c echo hi",
"cmd /c time /t",
#else
"whoami",
"id -u",
"pwd",
#endif
};