Skip to content
Snippets Groups Projects
Commit a4db4c7e authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Before creating the var directory, check for its existence.

parent 12723329
No related branches found
No related tags found
No related merge requests found
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment