From cf15738f588c2b0e8be9eafe04825f20a0c4926d Mon Sep 17 00:00:00 2001 From: devlinjd Date: Sat, 10 Oct 2015 21:38:06 -0400 Subject: [PATCH] Fix explicit output file bug. Fixes a bug that occurs when an explicit output file with an extension other than .all is specified on the command line. --- src/fluentcmd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fluentcmd.js b/src/fluentcmd.js index 91d32e2..c677d89 100644 --- a/src/fluentcmd.js +++ b/src/fluentcmd.js @@ -50,7 +50,7 @@ module.exports = function () { var to = path.resolve(t), pa = path.parse(to), fmat = pa.ext || '.all'; targets.push.apply(targets, fmat === '.all' ? _fmts.map(function(z){ return { file: to.replace(/all$/g,z.ext), fmt: z } }) - : [{ file: to, fmt: z }]); + : [{ file: to, fmt: _.findWhere( _fmts, { ext: fmat.substring(1) }) }]); }); // Run the transformation!