diff options
author | Ritesh Raj Sarraf <ritesh.sarraf@collabora.com> | 2018-10-12 15:26:43 (GMT) |
---|---|---|
committer | Ritesh Raj Sarraf <ritesh.sarraf@collabora.com> | 2018-10-12 15:26:43 (GMT) |
commit | 74f0355d8a0be644451ab2de460537bcae1de4c7 (patch) | |
tree | 79b601203f717458c61e0ac5f1bce6aa874e2370 /src/subprocess_test.cc | |
parent | ca041d88f4d610332aa48c801342edfafb622ccb (diff) | |
download | Ninja-74f0355d8a0be644451ab2de460537bcae1de4c7.zip Ninja-74f0355d8a0be644451ab2de460537bcae1de4c7.tar.gz Ninja-74f0355d8a0be644451ab2de460537bcae1de4c7.tar.bz2 |
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>
Diffstat (limited to 'src/subprocess_test.cc')
-rw-r--r-- | src/subprocess_test.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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 }; |