title: 'An error occurred when executing the "'cache:clear --no-warmup'" command' with capifony
body: <p>I am trying to deploy with capifony, but when I run</p>
  
  <pre><code>$ cap deploy
  </code></pre>
  
  <p>It returns an error</p>
  
  <pre><code>--&gt; Updating code base with remote_cache strategy
  Password: 
  --&gt; Creating cache directory................................✔
  --&gt; Creating symlinks for shared directories................✔
  --&gt; Creating symlinks for shared files......................✔
  --&gt; Normalizing asset timestamps............................✔
  --&gt; Updating Composer.......................................✔
  --&gt; Updating Composer dependencies..........................✘
  *** [err :: som.info] 
  *** [err :: som.info] [RuntimeException]
  *** [err :: som.info] An error occurred when executing the "'cache:clear --no-warmup'" command.
  
  *** [err :: som.info] Exception trace:
  *** [err :: som.info] () at /home/yamaken/som.info/shared/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:182
  *** [err :: som.info] Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeCommand() at /home/yamaken/som.info/shared/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:62
  
  .....
  </code></pre>
  
  <p>This is my <strong>deploy.rb</strong></p>
  
  <pre><code>set :application, "sommelier"
  set :domain,      "som.info"
  set :deploy_to,   "/home/yamaken/#{domain}"
  set :app_path,    "app"
  
  set :repository,  "git@github.com:haji/sommelier.git"
  set :scm,         :git
  
  set :default_shell,         "TERM=dumb sudo -u yamaken /bin/sh"
  
  set :branch, "master"
  
  set :scm_username, "haji"
  set :scm_passphrase, "********"
  
  set   :use_sudo,      false
  
  set :user, 'yamaken'
  
  set :model_manager, "doctrine"
  # Or: `propel`
  
  role :web,        domain                         # Your HTTP server, Apache/etc
  role :app,        domain, :primary =&gt; true       # This may be the same as your `Web` server
  
  set  :keep_releases,  3
  set :shared_files,        ["app/config/parameters.yml"]
  set :shared_children,     [app_path + "/spool",app_path + "/logs", web_path + "/uploads","vendor"]
  
  
  set :writable_dirs,       ["app/cache", "app/logs","app/spool"]
  set :permission_method,   :chown #
  set :use_set_permissions, false
  </code></pre>
  
  <p>I have tried the code according to @nifr suggestion.</p>
  
  <pre><code>$ _DEBUG=1 cap deploy
  Ruby Version                      =&gt; 1.8.7-p358
  OpenSSL::Version                  =&gt; OpenSSL 0.9.8y 5 Feb 2013
  Net::SSH::Version::CURRENT        =&gt; 2.6.8
  Net::SSH -&gt; Local platform        =&gt; unix
  Password: 
  Remote Whoami                     =&gt; yamaken
  umask on Server                   =&gt; 0022
  $SHELL                            =&gt; /bin/bash
  $BASH_VERSION                     =&gt; 4.1.5(1)-release
  Interactive Shell - Test: $PS1    =&gt; no
    * 2013-12-04 11:45:36 executing `deploy'
    * 2013-12-04 11:45:36 executing `deploy:update'
   ** transaction: start
    * 2013-12-04 11:45:36 executing `deploy:update_code'
      triggering before callbacks for `deploy:update_code'
  --&gt; Updating code base with checkout strategy
      executing locally: "git ls-remote git@github.com:haji/sommelier.git master"
      command finished in 2798ms
    * executing "git clone -q -b master git@github.com:haji/sommelier.git /home/yamaken/som.info/releases/20131204024539 &amp;&amp; cd /home/yamaken/som.info/releases/20131204024539 &amp;&amp; git checkout -q -b deploy 1ab8525ef883da0826b6b3d08a1c98da1904edd2 &amp;&amp; (echo 1ab8525ef883da0826b6b3d08a1c98da1904edd2 &gt; /home/yamaken/som.info/releases/20131204024539/REVISION)"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 24263ms
    * 2013-12-04 11:46:03 executing `deploy:finalize_update'
    * executing "chmod -R g+w /home/yamaken/som.info/releases/20131204024539"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 556ms
  --&gt; Creating cache directory
    * executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/app/cache ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/app/cache; fi'"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 374ms
    * executing "sh -c 'mkdir -p /home/yamaken/som.info/releases/20131204024539/app/cache &amp;&amp; chmod -R 0777 /home/yamaken/som.info/releases/20131204024539/app/cache'"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 383ms
    * executing "chmod -R g+w /home/yamaken/som.info/releases/20131204024539/app/cache"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 365ms
    * 2013-12-04 11:46:05 executing `deploy:share_childs'
  --&gt; Creating symlinks for shared directories
    * executing "mkdir -p /home/yamaken/som.info/shared/app/spool"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 370ms
    * executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/app/spool ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/app/spool; fi'"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 373ms
    * executing "ln -nfs /home/yamaken/som.info/shared/app/spool /home/yamaken/som.info/releases/20131204024539/app/spool"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 372ms
    * executing "mkdir -p /home/yamaken/som.info/shared/app/logs"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 369ms
    * executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/app/logs ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/app/logs; fi'"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 366ms
    * executing "ln -nfs /home/yamaken/som.info/shared/app/logs /home/yamaken/som.info/releases/20131204024539/app/logs"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 376ms
    * executing "mkdir -p /home/yamaken/som.info/shared/web/uploads"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 373ms
    * executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/web/uploads ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/web/uploads; fi'"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 401ms
    * executing "ln -nfs /home/yamaken/som.info/shared/web/uploads /home/yamaken/som.info/releases/20131204024539/web/uploads"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 375ms
    * executing "mkdir -p /home/yamaken/som.info/shared/vendor"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 375ms
    * executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/vendor ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/vendor; fi'"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 969ms
    * executing "ln -nfs /home/yamaken/som.info/shared/vendor /home/yamaken/som.info/releases/20131204024539/vendor"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 366ms
  --&gt; Creating symlinks for shared files
    * executing "mkdir -p /home/yamaken/som.info/shared/app/config"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 366ms
    * executing "touch /home/yamaken/som.info/shared/app/config/parameters.yml"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 378ms
    * executing "ln -nfs /home/yamaken/som.info/shared/app/config/parameters.yml /home/yamaken/som.info/releases/20131204024539/app/config/parameters.yml"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 393ms
  --&gt; Normalizing asset timestamps
    * executing "find /home/yamaken/som.info/releases/20131204024539/web/css /home/yamaken/som.info/releases/20131204024539/web/images /home/yamaken/som.info/releases/20131204024539/web/js -exec touch -t 201312040246.11 {} ';' &amp;&gt; /dev/null || true"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 383ms
      triggering after callbacks for `deploy:finalize_update'
    * 2013-12-04 11:46:12 executing `symfony:cache:warmup'
  --&gt; Warming up cache
    * executing "sh -c 'cd /home/yamaken/som.info/releases/20131204024539 &amp;&amp; php app/console cache:warmup --env=prod --no-debug'"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 530ms
  *** [deploy:update_code] rolling back
    * executing "rm -rf /home/yamaken/som.info/releases/20131204024539; true"
      servers: ["som.info"]
      [som.info] executing command
      command finished in 536ms
  failed: "TERM=dumb sudo -u yamaken /bin/sh -c 'sh -c '\\''cd /home/yamaken/som.info/releases/20131204024539 &amp;&amp; php app/console cache:warmup --env=prod --no-debug'\\'''" on som.info
  </code></pre>
  
  <p>I have another quesion, there is the way for not doing the line below after deploy fails?</p>
  
  <pre><code>executing "rm -rf /home/yamaken/som.info/releases/20131204024539; true"
  </code></pre>
  
  <p>If I can remain the fils on the server. I can check the cause by manual operation.</p>