Thanks Ruud,

For what it's worth:L

`if test('[ ', '-d', '.git ]' )`


Can be written as `test -d git`, as `[` is a bash alias for `test`, and ]
is a noop :)

So, that could be:

`if test(:test, '-d .git')`


which isn't toooooooo bad :)

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

On 2 March 2015 at 16:23, ruud <r.grosm...@gmail.com> wrote:

>
>
> On Thursday, 26 February 2015 17:51:50 UTC+1, Lee Hambley wrote:
>>
>> I'd suggest to use the `capture()` api to `capture(:pwd)`, and use Ruby's
>> `File.join()` APIs (or, just concatenate the strings) to build the command
>> to test for.
>>
>
> hi Lee,
>
> just for the records: it is possible to give a list to test(), so that
>   if test "[ -d .git ]"
> could also be written as
> if test('[ ', '-d', '.git ]' )
> resulting in expected behaviour (within-dir is used).
>
> regards, Ruud
>
> --
> 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/8bdb3ab1-01ff-4a25-8437-c4c2d5855cef%40googlegroups.com
> <https://groups.google.com/d/msgid/capistrano/8bdb3ab1-01ff-4a25-8437-c4c2d5855cef%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_%2BVLXmohQiyhwf97BgANxHspaNCXhrFT%2BRUN7Mu9SkOMAVoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to