refactor: use common.VerifyAppName for appExists
The duplicative logic didn't make much sense.
This commit is contained in:
1 parent
ffa303092f
commit
e0570be562
1 file changed
+1
-9
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user