refactor: use common.VerifyAppName for appExists

The duplicative logic didn't make much sense.
This commit is contained in:
Jose Diaz-Gonzalez committed 2020-12-27 15:14:11 -05:00
1 parent ffa303092f
commit e0570be562
1 file changed
+1 -9
+1 -9
View File
@@ -12,15 +12,7 @@ import (
// checks if an app exists // checks if an app exists
func appExists(appName string) error { func appExists(appName string) error {
if err := common.IsValidAppName(appName); err != nil { return common.VerifyAppName()
return err
}
if !common.DirectoryExists(common.AppRoot(appName)) {
return fmt.Errorf("App %s does not exist", appName)
}
return nil
} }
// checks if an app is locked // checks if an app is locked