1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-22 16:30:11 +00:00

Tweak missing file message for "new" command.

This commit is contained in:
hacksalot 2016-01-06 14:15:27 -05:00
parent 39e995213f
commit 830c36818e
2 changed files with 5 additions and 3 deletions

View File

@ -152,7 +152,8 @@ function initialize() {
// Override the .missingArgument behavior // Override the .missingArgument behavior
Command.prototype.missingArgument = function(name) { Command.prototype.missingArgument = function(name) {
throw { fluenterror: HACKMYSTATUS.resumeNotFound }; if( this.name() !== 'new' )
throw { fluenterror: HACKMYSTATUS.resumeNotFound };
}; };
// Override the .helpInformation behavior // Override the .helpInformation behavior

View File

@ -8,14 +8,15 @@ Implementation of the 'create' verb for HackMyResume.
var MKDIRP = require('mkdirp') var MKDIRP = require('mkdirp')
, PATH = require('path') , PATH = require('path')
, chalk = require('chalk'); , chalk = require('chalk')
, HACKMYSTATUS = require('../core/status-codes');
/** /**
Create a new empty resume in either FRESH or JRS format. Create a new empty resume in either FRESH or JRS format.
*/ */
module.exports = function create( src, dst, opts, logger ) { module.exports = function create( src, dst, opts, logger ) {
var _log = logger || console.log; var _log = logger || console.log;
if( !src || !src.length ) throw { fluenterror: 8 }; if( !src || !src.length ) throw { fluenterror: HACKMYSTATUS.createNameMissing };
src.forEach( function( t ) { src.forEach( function( t ) {
var safeFormat = opts.format.toUpperCase(); var safeFormat = opts.format.toUpperCase();
_log(chalk.green('Creating new ') + chalk.green.bold(safeFormat) + _log(chalk.green('Creating new ') + chalk.green.bold(safeFormat) +