Permalink
Browse files

Add tldr to tasks notes of README.md

  • Loading branch information...
1 parent e82c300 commit b330792c57384e7321719020be923c74d4ee1814 @pex pex committed Feb 13, 2014
Showing with 6 additions and 1 deletion.
  1. +6 −1 README.md
View
@@ -79,8 +79,13 @@ task :uptime do
end
```
-**Note:** `execute()` has a subtle behaviour. When calling `within './directory' { execute(:bundle, :install) }` for example, the first argument to `execute()` is a *Stringish* with ***no whitespace***, this allows the command to pass through the [`SSHKit::CommandMap`](https://github.com/capistrano/sshkit#the-command-map) which enables a number of powerful features . When the first argument to `execute()` contains whitespace, for example `within './directory' { execute('bundle install') }` (or when using a heredoc), Capistrano, nor SSHKit can reliably predict how it should be shell escaped, and thus cannot perform any context, or command mapping, that means that the `within(){}` (as well as `with()`, `as()`, etc) have no effect. There have been a few attempts to resolve this, but we don't consider it a bug, although we acknowledge that it might be a little counter intuitive.
+**Note**:
+**tl;dr**: `execute(:bundle, :install)` and `execute('bundle install')` don't behave identically!
+
+`execute()` has a subtle behaviour. When calling `within './directory' { execute(:bundle, :install) }` for example, the first argument to `execute()` is a *Stringish* with ***no whitespace***. This allows the command to pass through the [SSHKit::CommandMap](https://github.com/capistrano/sshkit#the-command-map) which enables a number of powerful features.
+
+When the first argument to `execute()` contains whitespace, for example `within './directory' { execute('bundle install') }` (or when using a heredoc), Capistrano, nor SSHKit can reliably predict how it should be shell escaped, and thus cannot perform any context, or command mapping, that means that the `within(){}` (as well as `with()`, `as()`, etc) have no effect. There have been a few attempts to resolve this, but we don't consider it a bug, although we acknowledge that it might be a little counter intuitive.
## Before / After
Where calling on the same task name, executed in order of inclusion

0 comments on commit b330792

Please sign in to comment.