import (
"bytes"
+ "errors"
"fmt"
"io"
"os"
if err != nil {
return "", err
}
+ if len(args) == 0 {
+ return "", errors.New("No arguments")
+ }
inputCmd := args[0]
return ExecCommand(inputCmd, args[1:]...)
if err != nil {
return nil, err
}
+ if len(args) == 0 {
+ return nil, errors.New("No arguments")
+ }
inputCmd := args[0]
return func() string {
output, err := RunCommand(input)
if err != nil {
return "", err
}
+ if len(args) == 0 {
+ return "", errors.New("No arguments")
+ }
inputCmd := args[0]
// Shut down the screen because we're going to interact directly with the shell