Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var fs = require('fs');
var path = require('path');

var credentialsFilePath = path.join(__dirname, 'credentials.json');
if(!path.existsSync(credentialsFilePath)) {
if(!fs.existsSync(credentialsFilePath)) {
throw "Before running any example, be sure to put your cloud credentials in the examples/credentials.json file. Use examples/credentials-sample.json as an guide";
}
var credentials = JSON.parse(fs.readFileSync(credentialsFilePath));
Expand Down
6 changes: 3 additions & 3 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function getTempDir() {
return envPath
}
} else {
if(path.existsSync(checkPath.fs)) {
if(fs.existsSync(checkPath.fs)) {
return checkPath.fs
}
}
Expand All @@ -195,7 +195,7 @@ Client.prototype._stageTempApp = function(appDir, callback) {
var stageName = md5.digest('hex');
stageDir = path.join(mainTempDir, "vcap-" + stageName)

if(path.exists(stageDir)) {
if(fs.exists(stageDir)) {
fs.rmdirSync(stageDir)
}
cp_rf(appDir, stageDir, function(err) {
Expand All @@ -204,7 +204,7 @@ Client.prototype._stageTempApp = function(appDir, callback) {
} else {
// Zip it.
var zipPath =path.join(mainTempDir, "vcap-" + stageName + ".zip")
if(path.exists(zipPath)) {
if(fs.exists(zipPath)) {
fs.unlinkSync(zipPath)
}
zip(stageDir, zipPath, function(err) {
Expand Down