Skip to content

Commit d8750e1

Browse files
committed
uploader/task: fix panic
1 parent 2585bc9 commit d8750e1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/uploader/task.custom.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ func OliveDefault(t *Task) error {
114114
doneChan := make(chan struct{})
115115
defer close(doneChan)
116116

117+
if t.Cmd == nil || len(t.Cmd.Args) == 0 {
118+
return nil
119+
}
120+
117121
cmd := exec.Command(t.Cmd.Args[0], t.Cmd.Args[1:]...)
118122

119123
envFilepath := "FILE_PATH=" + t.Filepath

0 commit comments

Comments
 (0)