Permalink
Browse files

fix existsSync moving around for 0.8

  • Loading branch information...
1 parent 371cce9 commit 844aa6bf097a26bc4d6716d44caebb4083334960 @substack committed Jul 28, 2012
Showing with 6 additions and 3 deletions.
  1. +3 −1 lib/git.js
  2. +2 −1 lib/remote.js
  3. +1 −1 package.json
View
@@ -1,6 +1,8 @@
var exec = require('child_process').exec;
var spawn = require('child_process').spawn;
var path = require('path');
+var fs = require('fs');
+var existsSync = fs.existsSync || path.existsSync;
exports.commit = function (cb) {
exec('git log --no-color | head -n1', function (err, stdout, stderr) {
@@ -46,7 +48,7 @@ exports.dir = function (cwd) {
var ps = (cwd || process.cwd()).split('/');
for (var i = ps.length; i > 0; i--) {
var dir = ps.slice(0, i).join('/');
- if (path.existsSync(dir + '/.git')) {
+ if (existsSync(dir + '/.git')) {
return dir;
}
}
View
@@ -1,12 +1,13 @@
var fs = require('fs');
var path = require('path');
+var existsSync = fs.existsSync || path.existsSync;
var git = require('./git');
var gitDir = git.dir();
var fleetFile = gitDir + '/fleet.json';
var remote = {};
-if (path.existsSync(fleetFile)) {
+if (existsSync(fleetFile)) {
var obj = JSON.parse(fs.readFileSync(fleetFile));
remote = obj.remote || {};
}
View
@@ -1,7 +1,7 @@
{
"name" : "fleet",
"description" : "command a cluster of processes ",
- "version" : "0.1.0",
+ "version" : "0.1.1",
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/fleet.git"

0 comments on commit 844aa6b

Please sign in to comment.