Skip to content

Commit

Permalink
add check if the api url exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Vlasic committed Aug 11, 2021
1 parent 4a4264e commit f668c25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/mantil/cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ var execCmd = &cobra.Command{
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
p, _, _, _ := findProject([]string{})
if p.ApiURL == "" {
log.Fatalf("api URL for the project does not exist")
}
data := cmd.Flag("data").Value.String()
endpoint := fmt.Sprintf("%s/%s", p.ApiURL, args[0])

Expand Down

0 comments on commit f668c25

Please sign in to comment.