From 0da52f47fab10bd0ac6896d3b0ffdc030a4464e3 Mon Sep 17 00:00:00 2001 From: Mark Cowlishaw Date: Fri, 10 Aug 2012 14:45:18 -0700 Subject: [PATCH] fix for issue #302 --- lib/cli/commands/account.js | 4 ++-- lib/cli/commands/config.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cli/commands/account.js b/lib/cli/commands/account.js index 509907a7de..4a846902a4 100644 --- a/lib/cli/commands/account.js +++ b/lib/cli/commands/account.js @@ -218,7 +218,7 @@ exports.init = function (cli) { .action(function () { function deleteIfExists(file, isDir) { - if (fs.existsSync(file)) { + if (utils.pathExistsSync(file)) { log.silly('Removing ' + file); (isDir ? fs.rmdirSync : fs.unlinkSync)(file); return true; @@ -340,7 +340,7 @@ exports.init = function (cli) { }; account.readSubscriptions = function () { - if (!fs.existsSync(publishSettingsFilePath)) { + if (!utils.pathExistsSync(publishSettingsFilePath)) { throw new Error('No publish settings file found. Please use "azure account import" first.'); } diff --git a/lib/cli/commands/config.js b/lib/cli/commands/config.js index 8843b575ec..82ad6caf8b 100644 --- a/lib/cli/commands/config.js +++ b/lib/cli/commands/config.js @@ -104,7 +104,7 @@ exports.init = function (cli) { }; config.writeConfig = function (cfg) { - if (!fs.existsSync(azurePath)) { + if (!utils.pathExistsSync(azurePath)) { log.silly('Creating folder', azurePath); fs.mkdirSync(azurePath, 502); //0766 } @@ -115,7 +115,7 @@ exports.init = function (cli) { config.clearConfig = function () { log.silly('Removing', azureConfigPath); - if (fs.existsSync(azureConfigPath)) { + if (utils.pathExistsSync(azureConfigPath)) { fs.unlinkSync(azureConfigPath); return true; }