Insert sudo only at the beginning of command in deep scan #495 (#539)

* Insert `sudo` only at the beginning of command in deep scan #495

* Fix testcase
This commit is contained in:
Kota Kanbe
2017-11-08 15:48:43 +09:00
committed by GitHub
parent c002f0168c
commit 5ced3c72b8
4 changed files with 5 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ func TestDecorateCmd(t *testing.T) {
conf: config.ServerInfo{User: "non-roor"},
cmd: "ls | grep hoge",
sudo: true,
expected: "sudo -S ls | sudo grep hoge",
expected: "sudo -S ls | grep hoge",
},
// -------------docker-------------
// root sudo false docker