diff --git a/cmd/acb/main.go b/cmd/acb/main.go index ac03d0e..75cb58a 100644 --- a/cmd/acb/main.go +++ b/cmd/acb/main.go @@ -24,8 +24,15 @@ func main() { flag.Parse() // Check required flags - if *jiraUser == "" || *proj == "" || *ghusername == "" || *start == "" || *end == "" || *employeename == "" { - fmt.Println("All flags are required") + if *start == "" || *end == "" { + fmt.Println("Error: start and end dates are required") + flag.Usage() + os.Exit(1) + } + + // Check that at least one of employee name, jira user, project, or ghusername is provided + if *employeename == "" && *jiraUser == "" && *proj == "" && *ghusername == "" { + fmt.Println("Error: at least one of employee name, jira user, project, or ghusername must be provided") flag.Usage() os.Exit(1) }