Skip to content
Permalink
Browse files

[fix] exists and existsSync fixes

  • Loading branch information...
jfhbrook authored and indexzero committed Jul 10, 2012
1 parent 7fb440b commit 9d46aaa003420d56c0985aac31e727121931d004
Showing with 4 additions and 2 deletions.
  1. +2 −1 lib/jitsu/commands/install.js
  2. +2 −1 lib/jitsu/package.js
@@ -7,6 +7,7 @@

var fs = require('fs'),
path = require('path'),
exists = fs.exists || path.exists,
common = require('../common'),
cpr = common.cpr,
rimraf = common.rimraf,
@@ -173,7 +174,7 @@ module.exports = function (requestedApp, callback) {
// Check if the app provides any configuration schema
//
app.config.schemaPath = './' + app.name + '/config/schema.json';
path.exists(app.config.schemaPath, function (exists) {
exists(app.config.schemaPath, function (exists) {
if (exists) {
try {
app.config.schema = JSON.parse(fs.readFileSync(app.config.schemaPath).toString());
@@ -7,6 +7,7 @@

var fs = require('fs'),
path = require('path'),
existsSync = fs.existsSync || path.existsSync,
util = require('util'),
spawnCommand = require('spawn-command'),
async = require('flatiron').common.async,
@@ -653,7 +654,7 @@ package.runScript = function (pkg, action, callback) {
function searchStartScript(dir) {
var scripts = ['server.js', 'bin/server', 'app.js', 'index.js'];
for (i in scripts) {
if (path.existsSync(path.join(dir, scripts[i]))) {
if (existsSync(path.join(dir, scripts[i]))) {
return scripts[i];
}
}

0 comments on commit 9d46aaa

Please sign in to comment.
You can’t perform that action at this time.