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

Added validation for App Name

This commit is contained in:
Valmik Jangla 2016-04-29 03:06:46 -07:00
parent e591574be0
commit 685536fb96

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: