Skip to content

Commit 3197977

Browse files
committed
fix(job): fail when --mount-options used without GCS mounts
1 parent a4fa191 commit 3197977

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cmd/job/submit.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ func validateGKENAPFlags() error {
388388

389389
func validateMountOptions() error {
390390
if mountOptions != "" {
391+
if len(volumeStr) == 0 {
392+
return fmt.Errorf("--mount-options requires at least one GCS mount")
393+
}
391394
for _, m := range volumeStr {
392395
if !strings.HasPrefix(m, "gs://") {
393396
return fmt.Errorf("--mount-options is currently only supported for GCS fuse volumes (gs://...)")

0 commit comments

Comments
 (0)