Skip to content

Commit 337a7c1

Browse files
committed
fix: ensure non-empty p.Config.ImageURI with error return
- Add a condition for `p.Config.ImageURI` to return an error if it is empty Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
1 parent e254618 commit 337a7c1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎plugin.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ func (p Plugin) Exec() error {
9292
if p.Config.S3Bucket == "" &&
9393
p.Config.S3Key == "" &&
9494
len(p.Config.Source) == 0 &&
95-
p.Config.ZipFile == "" {
96-
return errors.New("missing zip source")
95+
p.Config.ZipFile == "" &&
96+
p.Config.ImageURI == "" {
97+
return errors.New("missing zip source or s3 bucket/key or image uri")
9798
}
9899

99100
// Create Lambda service client

0 commit comments

Comments
 (0)
⌂ 换网址