move Promise requirement

This commit is contained in:
AJ ONeal 2016-06-21 17:16:55 +08:00
parent 6008b750b6
commit 4205bee0b1
1 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,6 @@ var fs = require('fs')
, HEADER
, outputFile
, outputPemsDir
, Promise = require('es6-promise').Promise
;
HEADER =
@ -182,7 +181,9 @@ function dumpCerts(certs, filename, pemsDir) {
}
function run(filename) {
return new Promise(function (resolve, reject) {
var PromiseA = require('es6-promise').Promise;
return new PromiseA(function (resolve, reject) {
if (!filename) {
console.error("Error: No file specified");
console.info("Usage: %s <outputfile>", process.argv[1]);