-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to provide Closure in runCommand() #118
Comments
That might be useful, to be to defer the evaluation to later. However, I don´t see a example of such case. |
Hey @bjornmagnusson . Thanks for your response! Let me try to illustrate my point (if I failed miserably - please re-ask). Example1: Example 2: Example 3: (not about runCommand but I believe it applies to the general idea) My actual case: tl;dr; I hardly see any case where the inability to defer evaluation of the actual commands couldn't be worked around this way or another. I am rather hoping that the (new) syntax would allow a more convenient way of expressing some intents without resorting to intermediary files or hard-coded names, etc. Not sure how costly would that be to implement, though. |
Hi,
Currently the
runCommand(String cmd)
API accepts a String CMD, which (if the Docker-typed task is created 'staticly') mandates that the whole command is available at project evaulation phase.The idea (feature request) would be to add additional API:
runCommand(Closure commandSpec)
to allow the actual command to be set at build stage.Use case being: in some cases the very command is not known till other build tasks run.
Note, there sure exist other/better approaches to solving same issue of deferring command evaluation (using Closure just strikes me as having the lowest cost-to-implement)
The text was updated successfully, but these errors were encountered: