@@ -2040,7 +2040,7 @@ func TestAPI(t *testing.T) {
2040
2040
// Verify commands were executed through the custom shell and environment.
2041
2041
require .NotEmpty (t ,fakeExec .commands ,"commands should be executed" )
2042
2042
2043
- // Want: /bin/custom-shell -c "docker ps --all --quiet --no-trunc"
2043
+ // Want: /bin/custom-shell -c' "docker" "ps" " --all" " --quiet" " --no-trunc"'
2044
2044
require .Equal (t ,testShell ,fakeExec .commands [0 ][0 ],"custom shell should be used" )
2045
2045
if runtime .GOOS == "windows" {
2046
2046
require .Equal (t ,"/c" ,fakeExec .commands [0 ][1 ],"shell should be called with /c on Windows" )
@@ -2049,6 +2049,7 @@ func TestAPI(t *testing.T) {
2049
2049
}
2050
2050
require .Len (t ,fakeExec .commands [0 ],3 ,"command should have 3 arguments" )
2051
2051
require .GreaterOrEqual (t ,strings .Count (fakeExec .commands [0 ][2 ]," " ),2 ,"command/script should have multiple arguments" )
2052
+ require .True (t ,strings .HasPrefix (fakeExec .commands [0 ][2 ],`"docker" "ps" "--all" "--quiet" "--no-trunc"` ),"command should start with docker ps --all --quiet --no-trunc" )
2052
2053
2053
2054
// Verify the environment was set on the command.
2054
2055
lastCmd := fakeExec .getLastCommand ()