check if directory exists before starting

This commit is contained in:
Dan Motzenbecker 2015-08-22 13:45:37 -04:00
parent 30ecbb97f2
commit 4fc36f6e68
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ init = (projName) ->
projNameUs = projName.replace(camelRx, '$1_$2').toLowerCase()
try
if fs.existsSync projNameHyph
throw new Error "Directory #{ projNameHyph } already exists"
execSync 'type lein'
execSync 'type pod'