Skip to content
This repository has been archived by the owner on Jul 9, 2018. It is now read-only.

Commit

Permalink
[fix] path.existsSync was moved to fs.existsSync
Browse files Browse the repository at this point in the history
  • Loading branch information
blakmatrix committed Jul 7, 2012
1 parent 64928fc commit eb82e02
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/cli.js
Expand Up @@ -102,7 +102,7 @@ function complete() {
process.exit();
}
var rel = join(fs.realpathSync(), name);
if (path.existsSync(rel)) {
if (fs.existsSync(rel)) {
name = rel;
}
// path can be absolute, relative to execution directory, or relative to CLI dir
Expand All @@ -119,7 +119,7 @@ function complete() {

Object.keys(program.data || {}).forEach(function (k) {
var p = program.data[k];
if (!p || !path.existsSync(p)) {
if (!p || !fs.existsSync(p)) {
console.error("invalid data usage: value must be a path to a file");
process.exit();
}
Expand Down
6 changes: 3 additions & 3 deletions lib/api.js
Expand Up @@ -182,7 +182,7 @@ Base.prototype.npm = function (dir) {
this.removeSubClassMethods();
if (envCheck()) {
o.domains.npm = path.resolve(dir);
if (!path.existsSync(o.domains.npm)) {
if (!fs.existsSync(o.domains.npm)) {
error('could not resolve the npm path - ' + o.domains.npm + ' does not exist');
}
}
Expand Down Expand Up @@ -296,7 +296,7 @@ Domains.prototype.add = function (key, val) {
}

o.domains[key] = path.resolve(val);
if (!path.existsSync(o.domains[key])) {
if (!fs.existsSync(o.domains[key])) {
error('could not resolve the ' + key + ' domain - ' + o.domains[key] + ' does not exist');
}
}
Expand Down Expand Up @@ -338,7 +338,7 @@ Libraries.prototype.path = function (dir) {
if (this.subclassMatches('Libraries', 'path') && envCheck()) {
if (type.isString(dir)) {
dir = path.resolve(dir);
if (!path.existsSync(dir)) {
if (!fs.existsSync(dir)) {
error('could not resolve the libraries path - ' + dir + ' does not exist');
}
o.libDir = dir;
Expand Down
2 changes: 1 addition & 1 deletion lib/resolver.js
Expand Up @@ -59,7 +59,7 @@ function makeNpmResolver(root) {
, json = {};

// folder must exists if we commit to it
if (!path.existsSync(folderPath)) {
if (!fs.existsSync(folderPath)) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
@@ -1,6 +1,6 @@
var path = require('path')
, fs = require('fs')
, exists = fs.existsSync || path.existsSync
, exists = fs.existsSync || fs.existsSync
, logule = require('logule').sub('modul8').suppress('debug')
, pkg = require('../package')
, projName = "";
Expand Down

0 comments on commit eb82e02

Please sign in to comment.