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