From 5bb36203f3ef606b7ba6fc07c8bd356b1293920a Mon Sep 17 00:00:00 2001 From: David Glasser Date: Thu, 6 Nov 2014 12:43:52 -0800 Subject: [PATCH] Cache files.inCheckout --- tools/files.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/files.js b/tools/files.js index 28886df1d4..ea87be9f18 100644 --- a/tools/files.js +++ b/tools/files.js @@ -120,14 +120,14 @@ files.addToGitignore = function (dirPath, entry) { }; // Are we running Meteor from a git checkout? -files.inCheckout = function () { +files.inCheckout = _.once(function () { try { if (fs.existsSync(path.join(files.getCurrentToolsDir(), '.git'))) return true; } catch (e) { console.log(e); } return false; -}; +}); // True if we are using a warehouse: either installed Meteor, or if // $METEOR_WAREHOUSE_DIR is set. Otherwise false (we're in a git checkout and