Permalink
Browse files

Before creating the var directory, check for its existence.

  • Loading branch information...
1 parent 1272332 commit a4db4c7e4fc07a0cdd27187742a4976f84ace2d4 @shane-tomlinson shane-tomlinson committed Jul 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 scripts/generate_ephemeral_keys.js
@@ -37,7 +37,7 @@ console.log('*** Generating ephemeral keys used for testing ***');
exec(GENERATE_KEYPAIR, '-k 256 -a rsa', function(stdout) {
if (stdout) console.log(stdout);
- fs.mkdirSync(VAR);
+ if (!existsSync(VAR)) fs.mkdirSync(VAR);
exec(CERTIFY, '-s key.secretkey -p key.publickey', function(cert) {
fs.writeFileSync(CERT, cert);
fs.unlinkSync('key.publickey');

0 comments on commit a4db4c7

Please sign in to comment.