2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

Merge pull request #210 from vjFaLk/new-app-fix

Added validation for App Name
This commit is contained in:
Anand Doshi 2016-05-09 15:43:46 +05:30
commit 112ea2e1f8

3
bench/app.py Normal file → Executable file
View File

@ -62,7 +62,8 @@ def get_app(app, git_url, branch=None, bench='.', build_asset_files=True, verbos
restart_supervisor_processes(bench=bench)
def new_app(app, bench='.'):
app = app.lower().replace(" ", "_")
# For backwards compatibility
app = app.lower().replace(" ", "_").replace("-", "_")
logger.info('creating new app {}'.format(app))
apps = os.path.abspath(os.path.join(bench, 'apps'))
if FRAPPE_VERSION == 4: