delete a golden file on the server when failure happens. ( Make sure you copy the file from a known location before the start of the task.) You can even seperate concerns by using new before feature in Cap2. I love Cap when it comes to deployment and automation. Then look for it using the following command. run "ls -l filename"
If the file is not found the error code returned is 1. I have used this value build error checking and report failure in an automated way. -RS On Jan 4, 5:07 pm, RubySmith <[EMAIL PROTECTED]> wrote: > How can i test whether a file exist on a remote server within > Capistrano script and based on the result, i should raise an exception > or not? > > File.exists?(remote_path) only work for locally. How can make it work > or run or remote server? --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
