[Pkg-javascript-commits] [node-shell-quote] 66/137: first half of functional env() works

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:40 UTC 2017


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

rouca pushed a commit to branch master
in repository node-shell-quote.

commit 7a0cf79987fbdcc00d8f36c6dc164d22db963d23
Author: James Halliday <mail at substack.net>
Date:   Mon May 13 05:26:36 2013 -0700

    first half of functional env() works
---
 index.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 9f3685c..1c98298 100644
--- a/index.js
+++ b/index.js
@@ -57,6 +57,9 @@ exports.parse = function parse (s, env) {
     });
     
     function getVar (_, pre, key) {
-        return pre + String(env[key] || '');
+        if (typeof env === 'function') {
+            return pre + String(env(key) || '');
+        }
+        else return pre + String(env[key] || '');
     }
 };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shell-quote.git



More information about the Pkg-javascript-commits mailing list