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,6 +1,7 @@
|
|||
package compose
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
|
@ -44,6 +45,11 @@ func (Header) Execute(aerc *widgets.Aerc, args []string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(args) < optind+1 {
|
||||
return errors.New("command parsing failed")
|
||||
}
|
||||
|
||||
var (
|
||||
force bool = false
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue