raise when create in a no empty dir
@@ -79,6 +79,11 @@ function _create_project(language, templateid, targetname)
-- enter the project directory
os.cd(projectdir)
+ -- ensure the project directory is empty
+ if #os.filedirs('./*') ~= 0 then
+ raise("project directory (${underline}%s${reset}) is not empty!", path.relative(projectdir, os.workingdir()))
+ end
+
-- create project
local filedirs = {}
local sourcedir = path.join(tempinst:scriptdir(), "project")
