From abf87255f7599d3e1dd6b5a360dd9ab0157268ca Mon Sep 17 00:00:00 2001 From: Luke Page Date: Sun, 21 Oct 2012 15:27:06 +0100 Subject: [PATCH] Only output stack if it is not a less error --- lib/less/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/less/index.js b/lib/less/index.js index 7ffbbcf6..384b2a25 100644 --- a/lib/less/index.js +++ b/lib/less/index.js @@ -41,7 +41,8 @@ var less = { var error = []; var stylize = options.color ? require('./lessc_helper').stylize : function (str) { return str }; - if (ctx.stack) { return stylize(ctx.stack, 'red') } + // only output a stack if it isn't a less error + if (ctx.stack && !ctx.type) { return stylize(ctx.stack, 'red') } if (!ctx.hasOwnProperty('index')) { return ctx.stack || ctx.message;