Do not pass arguments if empty
This commit is contained in:
parent
1c8a2a0924
commit
6619bd86ce
4
main.go
4
main.go
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue