mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Merge pull request #99 from Acidic9/master
Remove abort with 'revel new' on empty directory
This commit is contained in:
@@ -145,8 +145,10 @@ func setApplicationPath(args []string) {
|
|||||||
importPath)
|
importPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appPath = filepath.Join(srcRoot, filepath.FromSlash(importPath))
|
||||||
|
|
||||||
_, err = build.Import(importPath, "", build.FindOnly)
|
_, err = build.Import(importPath, "", build.FindOnly)
|
||||||
if err == nil {
|
if err == nil && !empty(appPath) {
|
||||||
errorf("Abort: Import path %s already exists.\n", importPath)
|
errorf("Abort: Import path %s already exists.\n", importPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +157,6 @@ func setApplicationPath(args []string) {
|
|||||||
errorf("Abort: Could not find Revel source code: %s\n", err)
|
errorf("Abort: Could not find Revel source code: %s\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
appPath = filepath.Join(srcRoot, filepath.FromSlash(importPath))
|
|
||||||
appName = filepath.Base(appPath)
|
appName = filepath.Base(appPath)
|
||||||
basePath = filepath.ToSlash(filepath.Dir(importPath))
|
basePath = filepath.ToSlash(filepath.Dir(importPath))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user