| Q | A |
| --- | --- |
| Issue Type | Question |
| Deployer Version | 3.3.0 |
| Local Machine OS | macOS El Capitan |
| Remote Machine OS | Ubuntu 14.04 |
As an additional control mechanism I'd like to add an additional step to my deployment that displays a message and asks for confirmation.
In one of my projects I have a certain prerequisit to be met in order for the deployment to succeed. I'd like to display a message 谩 la "Did you make sure to do XYZ (yes|no)" and only proceed with deployment if "yes" is entered.
Is there a way to achieve this?
Try use this:
askConfirmation(string $message[, bool $default = false])
Could you give code example, I'm having hard time figuring out how to ask for confirmation AND if user answers no -> cancel deploy.
Something like this:
task('ask', function() {
if(!askConfirmation('Deploy app?')) {
die('Ok, no deploy then.');
}
});
before('deploy', 'ask');
Thank you!
Most helpful comment
Something like this: