Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In commands, resolve undefined to "" rather than no argument
After some discussion with @dra27, it seems in general safer to hold the positional argument with an empty string rather than shift the possible remaining arguments. So for example, with build: ["some-command" foo "bar"] Previously, if `foo` wasn't defined, that would become `["some-command" "bar"]`. To avoid that, you had to use a string interpolation such as: build: ["some-command" "%{foo}%" "bar"] which is a little heavy under the fingers. With this patch, the behaviour would be the same. Obtaining the previous behaviour is still possible by using an explicit filter: build: ["some-command" foo {?foo} "bar"] which makes it explicit that the positional argument might be present or not
- Loading branch information