[Pkg-javascript-commits] [less.js] 06/10: Warn when the environment is asked for a file manager with no filname or directory

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:26:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.1.2
in repository less.js.

commit 974407b4707d58e22d951e7c7ed201834a57bb30
Author: Luke Page <luke.a.page at gmail.com>
Date:   Fri Nov 28 18:06:04 2014 +0000

    Warn when the environment is asked for a file manager with no filname or directory
---
 lib/less/environment/environment.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/less/environment/environment.js b/lib/less/environment/environment.js
index be654da..57366c1 100644
--- a/lib/less/environment/environment.js
+++ b/lib/less/environment/environment.js
@@ -1,3 +1,4 @@
+var logger = require("../logger");
 var environment = function(externalEnvironment, fileManagers) {
     this.fileManagers = fileManagers || [];
     externalEnvironment = externalEnvironment || {};
@@ -18,6 +19,14 @@ var environment = function(externalEnvironment, fileManagers) {
 };
 
 environment.prototype.getFileManager = function (filename, currentDirectory, options, environment, isSync) {
+
+    if (!filename) {
+        logger.warn("getFileManager called with no filename.. Please report this issue. continuing.");
+    }
+    if (currentDirectory == null) {
+        logger.warn("getFileManager called with null directory.. Please report this issue. continuing.");
+    }
+
     var fileManagers = this.fileManagers;
     if (options.pluginManager) {
         fileManagers = [].concat(fileManagers).concat(options.pluginManager.getFileManagers());

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list