Remove duplicate definition of path variable

This commit is contained in:
YuviPanda 2014-09-13 18:51:10 +01:00
parent b3b36282aa
commit 77484ccdf3

View File

@ -3,14 +3,15 @@ var bcrypt = require("bcrypt");
var fs = require("fs"); var fs = require("fs");
var program = require("commander"); var program = require("commander");
var mkdirp = require("mkdirp"); var mkdirp = require("mkdirp");
var Helper = require("../helper");
const HOME = process.env.HOME + "/.shout";
program program
.command("add <name>") .command("add <name>")
.description("Add a new user") .description("Add a new user")
.action(function(name) { .action(function(name) {
var path = Helper.resolveHomePath("users");
try { try {
var path = Helper.resolveHomePath("users");
mkdirp.sync(path); mkdirp.sync(path);
} catch (e) { } catch (e) {
console.log(""); console.log("");
@ -20,7 +21,6 @@ program
return; return;
} }
try { try {
var path = Helper.resolveHomePath("users");
var test = path + "/.test"; var test = path + "/.test";
fs.mkdirSync(test); fs.mkdirSync(test);
fs.rmdirSync(test); fs.rmdirSync(test);