fix: load appfile

This commit is contained in:
ryan
2020-12-09 11:33:26 +08:00
parent 960322c21f
commit 3211c89610
+2 -2
View File
@@ -55,10 +55,10 @@ func NewAppFile() *AppFile {
// Load will load appfile from default path
func Load() (*AppFile, error) {
if _, err := os.Stat(DefaultAppfilePath); err != nil {
if _, err := os.Stat(DefaultAppfilePath); err == nil {
return LoadFromFile(DefaultAppfilePath)
}
if _, err := os.Stat(DefaultJSONAppfilePath); err != nil {
if _, err := os.Stat(DefaultJSONAppfilePath); err == nil {
return LoadFromFile(DefaultJSONAppfilePath)
}
return LoadFromFile(DefaultUnknowFormatAppfilePath)