Skip to content

Commit 0f6c1b9

Browse files
committed
fix: vil ikke ha tomme filnavn
fixes #243
1 parent 512aae5 commit 0f6c1b9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pkg/deployclient/config.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package deployclient
22

33
import (
44
"encoding/hex"
5+
"fmt"
56
"os"
67
"strconv"
78
"strings"
@@ -129,6 +130,12 @@ func (cfg *Config) Validate() error {
129130
return ErrResourceRequired
130131
}
131132

133+
for i, path := range cfg.Resource {
134+
if len(path) == 0 {
135+
return fmt.Errorf("resource at index %d is empty (check for stray commas in --resource)", i)
136+
}
137+
}
138+
132139
if len(cfg.WorkloadName) > 0 && len(cfg.WorkloadImage) == 0 {
133140
return ErrImageRequired
134141
}

0 commit comments

Comments
 (0)