Permalink
Browse files

[fix] Revert "allow defaultAuthor to be defined in config.json" (Reas…

…on: long method access chain without guards and dirty formatting.)

This reverts commit 8e951b4.
  • Loading branch information...
1 parent 6a82b99 commit 63c357eed4d8fc7d575ad45b75fbc6851ea9ba6c @jfhbrook jfhbrook committed Feb 2, 2012
Showing with 1 addition and 10 deletions.
  1. +1 −10 lib/commands/post.js
View
@@ -1,17 +1,11 @@
var smith = require("../blacksmith"),
fs2 = require('../fs2'),
winston = require('winston'),
- path = require('path'),
prompt = require("prompt");
module.exports = function() {
winston.info("Executing command "+"post".yellow);
- if(smith.config.global.store.defaultAuthor && path.existsSync('./authors/'+smith.config.global.store.defaultAuthor+'.json')) {
- var authors = require("../loaders/authors").load(true);
- var defaultAuthor = authors[smith.config.global.store.defaultAuthor].file.store.name;
- }
-
prompt.start();
prompt.get([
{
@@ -20,17 +14,14 @@ module.exports = function() {
},
{
name: "author",
- message: "Specify the author" + (defaultAuthor ? " (empty to use '"+defaultAuthor+"')" : "")
+ message: "Specify the author"
}
], function (err, res) {
if (err) {
winston.error(err.stack);
cb(1);
}
- if(res.author === "")
- res.author = smith.config.global.store.defaultAuthor;
-
var folder = res.title.toLowerCase().replace(/\W+/g, '-');
//TODO: Check authors

0 comments on commit 63c357e

Please sign in to comment.