From 4fc36f6e68131678a3fc6ec8bce3303812ba9f63 Mon Sep 17 00:00:00 2001 From: Dan Motzenbecker Date: Sat, 22 Aug 2015 13:45:37 -0400 Subject: [PATCH] check if directory exists before starting --- main.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.coffee b/main.coffee index fba02be..70453ab 100644 --- a/main.coffee +++ b/main.coffee @@ -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'