diff --git a/airflow/airflow.go b/airflow/airflow.go index bf7e68739..bd695ffb4 100644 --- a/airflow/airflow.go +++ b/airflow/airflow.go @@ -43,11 +43,15 @@ func initFiles(root string, files map[string]string) error { fullpath := filepath.Join(root, file) // Move on if already exists - _, err := fileutil.Exists(fullpath) + fileExist, err := fileutil.Exists(fullpath) if err != nil { return errors.Wrapf(err, "failed to check existence of '%s'", fullpath) } + if fileExist { + continue + } + // Write files out if err := fileutil.WriteStringToFile(fullpath, content); err != nil { return errors.Wrapf(err, "failed to create file '%s'", fullpath)