Skip to content

Commit

Permalink
[fix] skip empty cmd
Browse files Browse the repository at this point in the history
Signed-off-by: xyz-li <[email protected]>
  • Loading branch information
xyz-li authored and joamaki committed Nov 22, 2024
1 parent bedf51d commit e90d087
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ type ScriptCmds struct {
func (sc ScriptCmds) Map() map[string]script.Cmd {
m := make(map[string]script.Cmd, len(sc.ScriptCmds))
for _, c := range sc.ScriptCmds {
m[c.Name] = c.Cmd
if c.Name != "" {
m[c.Name] = c.Cmd
}
}
return m
}
Expand Down

0 comments on commit e90d087

Please sign in to comment.