Skip to content

Commit

Permalink
Merge pull request #77 from astronomerio/feature/6-friendlier-fail-if…
Browse files Browse the repository at this point in the history
…-config-does-not-exist

Handle error where .astro dir exist but config.yaml does not
  • Loading branch information
andscoop committed Aug 22, 2018
2 parents c40b999 + 22aaee1 commit e8c0d34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/airflow.go
Expand Up @@ -132,6 +132,13 @@ func ensureProjectDir(cmd *cobra.Command, args []string) {
fmt.Println(messages.CONFIG_PROJECT_DIR_ERROR)
os.Exit(1)
}

projectConfigFile := filepath.Join(config.WorkingPath, config.ConfigDir, config.ConfigFileNameWithExt)
configExists := fileutil.Exists(projectConfigFile)
if !configExists {
fmt.Println("Error: Project not initialized")
os.Exit(1)
}
}

// Use project name for image name
Expand Down

0 comments on commit e8c0d34

Please sign in to comment.