Do not pass arguments if empty
This commit is contained in:
parent
1c8a2a0924
commit
6619bd86ce
6
main.go
6
main.go
|
@ -41,7 +41,11 @@ func interactiveShell() {
|
||||||
func showQueue() {
|
func showQueue() {
|
||||||
var entries []parser.QEntry
|
var entries []parser.QEntry
|
||||||
var err error
|
var err error
|
||||||
entries, err = readFromCmd(exec.Command(settings["mailqCommand"], settings["mailqCommandArgs"]))
|
if settings["mailqCommandArgs"] == "" {
|
||||||
|
entries, err = readFromCmd(exec.Command(settings["mailqCommand"]))
|
||||||
|
} else {
|
||||||
|
entries, err = readFromCmd(exec.Command(settings["mailqCommand"], settings["mailqCommandArgs"]))
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error reading: %s\n", err.Error())
|
fmt.Printf("Error reading: %s\n", err.Error())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
Loading…
Reference in New Issue