🐛 fix: handle empty commands
This commit is contained in:
parent
dd257abbbe
commit
b13b510cf1
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user