Skip to content

Commit

Permalink
make error better is task file does not exist in expected location
Browse files Browse the repository at this point in the history
  • Loading branch information
zachariahmiller committed May 30, 2024
1 parent 924c2b9 commit 0d8f531
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ var runCmd = &cobra.Command{
Run: func(_ *cobra.Command, args []string) {
var tasksFile types.TasksFile

if _, err := os.Stat(config.TaskFileLocation); os.IsNotExist(err) {
message.Fatalf(err, "file does not exist: %s", config.TaskFileLocation)
}

err := utils.ReadYaml(config.TaskFileLocation, &tasksFile)
if err != nil {
message.Fatalf(err, "Cannot unmarshal %s", config.TaskFileLocation)
Expand Down

0 comments on commit 0d8f531

Please sign in to comment.