Skip to content

Commit bed84a3

Browse files
authored
Merge pull request #173 from mach6/master
Add a pipeline type check to the exec command
2 parents 2064b97 + ac6e684 commit bed84a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drone/exec/exec.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package exec
33
import (
44
"context"
55
"errors"
6+
"fmt"
67
"io/ioutil"
78
"log"
89
"net/url"
@@ -188,6 +189,11 @@ func exec(c *cli.Context) error {
188189
if !ok {
189190
continue
190191
}
192+
193+
if v.Type != "" && v.Type != "docker" {
194+
return fmt.Errorf("pipeline type (%s) is not supported with 'drone exec'", v.Type)
195+
}
196+
191197
if filter == "" || filter == v.Name {
192198
pipeline = v
193199
break

0 commit comments

Comments
 (0)