fix: out-of-bounds error in command header
This commit fixes an out-of-bound error that happened while parsing commands. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
3c08b8e6a9
commit
4dbdf58688
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package compose
|
package compose
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -44,6 +45,11 @@ func (Header) Execute(aerc *widgets.Aerc, args []string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(args) < optind+1 {
|
||||||
|
return errors.New("command parsing failed")
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
force bool = false
|
force bool = false
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue