🐛 fix: handle empty commands

This commit is contained in:
James Walker 2023-06-07 22:04:18 -04:00
parent dd257abbbe
commit b13b510cf1
Signed by: walkah
GPG Key ID: 3C127179D6086E93

View File

@ -202,6 +202,9 @@ func (p *Project) GetRoot() string {
func (p *Project) RunCommands(commands []string) { func (p *Project) RunCommands(commands []string) {
for _, command := range commands { for _, command := range commands {
if command == "" {
continue
}
args := strings.Fields(command) args := strings.Fields(command)
cmd := exec.Command(args[0], args[1:]...) cmd := exec.Command(args[0], args[1:]...)
cmd.Dir = p.GetRoot() cmd.Dir = p.GetRoot()