Comparing version 0.0.19 to 0.1.0
@@ -19,3 +19,20 @@ 'use strict'; | ||
require('./../dist/commands/' + command)(vorpal); | ||
vorpal.exec(command + ' ' + args.join(' ')); | ||
args = args.join(' '); | ||
// If we passed in a help request, load in | ||
// the help file. | ||
if (args.indexOf('help') > -1 || args.indexOf('?') > -1) { | ||
let help; | ||
try { | ||
help = require('./../dist/help/' + command + '.js'); | ||
help = String(help).replace(/^\n|\n$/g, ''); | ||
} catch (e) {} | ||
let cmdObj = vorpal.find(command); | ||
if (cmdObj && help) { | ||
cmdObj.help(function (argus, cb) { | ||
cb(help); | ||
}) | ||
} | ||
} | ||
vorpal.exec(command + ' ' + args); | ||
} else { | ||
@@ -22,0 +39,0 @@ // If we get into piping other commands, |
@@ -93,3 +93,5 @@ 'use strict'; | ||
} catch (e) { | ||
/* istanbul ignore next */ | ||
self.log(e.stack); | ||
/* istanbul ignore next */ | ||
return 1; | ||
@@ -96,0 +98,0 @@ } |
{ | ||
"name": "cash-cat", | ||
"version": "0.0.19", | ||
"version": "0.1.0", | ||
"description": "Cross-platform implementation of the Unix 'cat' command.", | ||
@@ -41,3 +41,3 @@ "main": "./dist/commands/cat.js", | ||
"glob": "^6.0.4", | ||
"vorpal": "^1.9.2" | ||
"vorpal": "^1.9.5" | ||
}, | ||
@@ -44,0 +44,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12026
290
4
Updatedvorpal@^1.9.5