Print unhandeled command in FakeExec

pull/6/head
Sami Wagiaalla 2015-11-06 16:33:42 -05:00
parent 13e68d2a87
commit d10d81d811
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ type FakeCommandAction func(cmd string, args ...string) Cmd
func (fake *FakeExec) Command(cmd string, args ...string) Cmd {
if fake.CommandCalls > len(fake.CommandScript)-1 {
panic("ran out of Command() actions")
panic(fmt.Sprintf("ran out of Command() actions. Could not handle command [%d]: %s args: %v", fake.CommandCalls, cmd, args))
}
i := fake.CommandCalls
fake.CommandCalls++