Hi Bram, Try throwing "capture=False" to the end of your local() call (so it reads local("my command", capture=False)) and it should hopefully display the error message that 'mv' is giving to you.
(That's what this is -- local() called a shell command and got back a nonzero return value, which is Unix-speak for "something blew up.") So either your constructed command isn't correctly formatted (maybe the file paths are missing a leading or trailing slash somewhere, or they're empty by accident) or maybe the permissions are such that your user can't move the file; could be anything, really :) Good luck, Jeff On Wed, Feb 17, 2010 at 3:31 PM, Bram Enning <bramenn...@gmail.com> wrote: > Hi, > > I keep getting into trouble when trying to combine local and remote > commands (Fatal error: local() encountered an error (return code 1) while > executing). It must be something simple... > > I issue 'fab testserver deploy_trunk' > > This is the setup I use (not programmer, sorry): > > def testserver(): > env.user = 'bram' > env.hosts = ['192.168.1.30'] > env.cwd = '/home/me>' > env.proj_name = os.path.split(os.path.dirname(__file__))[1] > env.proj_path = os.path.realpath(os.path.dirname(__file__)) > > def create_tar_from_repo(): > local('mv -f %s/releases/latest_release.tar.gz > %s/releases/previous_release.tar.gz' % (env.proj_path, env.proj_path)) > ..... > ..... > > def upload_tar(): > """ > Uploads the tar to the releases folder > """ > run('mv -f ./releases/latest_release.tar.gz > ./releases/previous_release.tar.gz') > put('%s/releases/latest_release.tar.gz' % (env.proj_path), > './releases/') > .... > > def deploy_trunk(): > create_tar_from_repo() > upload_tar() > .... > > _______________________________________________ > Fab-user mailing list > Fab-user@nongnu.org > http://lists.nongnu.org/mailman/listinfo/fab-user > > -- Jeff Forcier Unix sysadmin; Python/Ruby developer http://bitprophet.org _______________________________________________ Fab-user mailing list Fab-user@nongnu.org http://lists.nongnu.org/mailman/listinfo/fab-user