From cac4a0d03a0fc018eb89429f0d5078dd9cdf6184 Mon Sep 17 00:00:00 2001 From: Farrin Reid Date: Sat, 7 Jul 2012 02:55:04 -0800 Subject: [PATCH] [fix] path.exists was moved to fs.exists --- scripts/linux/hooks.js | 2 +- scripts/mac/hooks.js | 4 ++-- scripts/post_install.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/linux/hooks.js b/scripts/linux/hooks.js index a8ab74b4c..b58715b9c 100755 --- a/scripts/linux/hooks.js +++ b/scripts/linux/hooks.js @@ -46,7 +46,7 @@ var copy_init_script = function(distro, callback){ var full_path = get_init_script_path(distro); - path.exists(full_path, function(exists){ + fs.exists(full_path, function(exists){ if(exists) return callback(new Error("File already exists!")) var template = fs.readFileSync(path.resolve(__dirname + "/" + init_script_name)); diff --git a/scripts/mac/hooks.js b/scripts/mac/hooks.js index 275c3d353..d2e41a1da 100755 --- a/scripts/mac/hooks.js +++ b/scripts/mac/hooks.js @@ -66,7 +66,7 @@ exports.post_install = function(callback){ console.log('Setting up launchd script...'); - path.exists(launchd_plist_path, function(exists){ + fs.exists(launchd_plist_path, function(exists){ if(exists){ console.log("LaunchDaemon plist file already exists. Skipping..."); @@ -91,7 +91,7 @@ exports.post_install = function(callback){ exports.pre_uninstall = function(callback){ console.log('Removing launchd script...'); - path.exists(launchd_plist_path, function(exists){ + fs.exists(launchd_plist_path, function(exists){ if(!exists){ console.log("LaunchDaemon plist file already removed. Skipping..."); diff --git a/scripts/post_install.js b/scripts/post_install.js index 35ce0902e..e0c865315 100755 --- a/scripts/post_install.js +++ b/scripts/post_install.js @@ -38,7 +38,7 @@ run('install_deps.js', function(err){ // make sure the executable exists before setting up any triggers - path.exists(prey_bin, function(exists){ + fs.exists(prey_bin, function(exists){ if(!exists){ var msg = "We couldn't found the Prey executable in " + prey_bin;