Permalink
Browse files

Fixed existsSync issues with 0.8.x

  • Loading branch information...
1 parent 8ffd1b1 commit 7864262e489d649e23ea6c12c7e12d31f4dc027e @davglass committed Jul 9, 2012
Showing with 5 additions and 3 deletions.
  1. +2 −1 lib/index.js
  2. +3 −2 lib/seed.js
View
@@ -6,9 +6,10 @@ var combo = require('combohandler'),
stamp = 'yui3-local',
path = require('path'),
fs = require('fs'),
+ exists = fs.existsSync || path.existsSync,
p = path.join(process.cwd(), 'build');
-if (!path.existsSync(p)) {
+if (!exists(p)) {
throw("Can't find " + p + " directory, are you in the root of the YUI git repo?");
}
View
@@ -1,6 +1,7 @@
var path = require('path'),
- fs = require('fs');
+ fs = require('fs'),
+ exists = fs.existsSync || path.existsSync;
module.exports = {
@@ -12,7 +13,7 @@ module.exports = {
stamp: function(o) {
var root = o.rootPath;
- if (!path.existsSync(root)) {
+ if (!exists(root)) {
throw('Root path does not exist');
}

0 comments on commit 7864262

Please sign in to comment.