test() might not be working the way you think it is -
https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md#print-some-arbitrary-output-with-the-logging-methods


Lee Hambley
--
http://lee.hambley.name/
+49 (0) 170 298 5667

On 12 November 2014 22:17, Christoph Hösler <christoph.hoes...@gmail.com>
wrote:

> Hi all. I am experimenting with Capistrano for the first time.
> While trying to do a website deployment with Mixd/wp-deploy, I couldn't
> make my symlinks get created using :linked_files.
> After digging deep into the code I found out, that in the
> deploy:symlink:linked_files task the test for already existing links, which
> precedes their creation, returns true when it should not.
>
> I wrote a simple test task to verify my finding. Can someone explain me
> the following behavior:
>
> In deploy.rb:
>
> namespace :my do
>   task :test do
>     on release_roles :all do
>       if test "false"
>         puts "false is true"
>         puts capture("if false; then echo 'Indeed!'; else echo 'Not
> really!'; fi")
>       end
>     end
>   end
> end
>
> Running 'bundle exec cap production my:test' prints:
>
> false is true
> Not really!
>
> I get the same results if I replace test "false" with test "[ -f / ]", for
> example.
>
> --
> Thanks for help,
> Christoph
>
>
>
> Versions:
>
>    - Ruby: ruby 2.0.0p481 (2014-05-08 revision 45883)
>    [universal.x86_64-darwin13]
>    - Capistrano: 3.1.0
>    - Rake: 10.1.1
>
> Platform:
>
>    - Working on.... OSX 10.9
>    - Deploying to... x86_64 GNU/Linux
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to capistrano+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/capistrano/6a0d9d4b-e657-4f5e-9827-d7f868b81bd5%40googlegroups.com
> <https://groups.google.com/d/msgid/capistrano/6a0d9d4b-e657-4f5e-9827-d7f868b81bd5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/CAN_%2BVLUtERsO_WG%3Db2YhTkzWKFDo2qSBazi7Cp5cuEbxA_YyLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to