Skip to content

Commit

Permalink
Merge pull request #289 from superfly:codepope/issue288
Browse files Browse the repository at this point in the history
Regression on fix for dot in app pathnames.
  • Loading branch information
codepope committed Sep 7, 2020
2 parents d523113 + e6a1a7c commit 0eaff6f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions flyctl/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,17 @@ func ResolveConfigFileFromPath(p string) (string, error) {
return "", err
}

// path is a file, return
if filepath.Ext(p) != "" {
// Is this a bare directory path? Stat the path
pd, err := os.Stat(p)

if err == os.ErrNotExist {
return path.Join(p, defaultConfigFileName), nil
} else if err != nil {
return "", err
}

// Ok, something exists. Is it a file - yes? return the path
if !pd.IsDir() {
return p, nil
}

Expand Down

0 comments on commit 0eaff6f

Please sign in to comment.