Skip to content

Commit

Permalink
Fix: Argo CLI should show warning if there is no workflow definition …
Browse files Browse the repository at this point in the history
…in file #1486

Fix: Argo CLI should show warning if there is no workflow definition in file #1486
  • Loading branch information
sarabala1979 authored Jul 18, 2019
1 parent af7e496 commit 38c4def
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/argo/commands/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func SubmitWorkflows(filePaths []string, submitOpts *util.SubmitOpts, cliOpts *c
}
}

if len(workflows) == 0 {
log.Println("No Workflow found in given files")
os.Exit(1)
}

var workflowNames []string
for _, wf := range workflows {
wf.Spec.Priority = cliOpts.priority
Expand Down

0 comments on commit 38c4def

Please sign in to comment.