Do not pass arguments if empty

This commit is contained in:
Jan Philipp Timme 2018-12-30 13:34:45 +01:00
parent 1c8a2a0924
commit 6619bd86ce
1 changed files with 5 additions and 1 deletions

View File

@ -41,7 +41,11 @@ func interactiveShell() {
func showQueue() {
var entries []parser.QEntry
var err error
if settings["mailqCommandArgs"] == "" {
entries, err = readFromCmd(exec.Command(settings["mailqCommand"]))
} else {
entries, err = readFromCmd(exec.Command(settings["mailqCommand"], settings["mailqCommandArgs"]))
}
if err != nil {
fmt.Printf("Error reading: %s\n", err.Error())
os.Exit(1)