From 48484793ac95c291a9732fda3c5d3c031fb1e24e Mon Sep 17 00:00:00 2001 From: Bart Swaalf Date: Mon, 15 Feb 2016 12:17:18 +0100 Subject: [PATCH] added simple confirm-environment task to help prevent accidental deploys to productions --- .../Communication/ConfirmEnvironmentTask.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Mage/Task/Newcraft/Communication/ConfirmEnvironmentTask.php diff --git a/Mage/Task/Newcraft/Communication/ConfirmEnvironmentTask.php b/Mage/Task/Newcraft/Communication/ConfirmEnvironmentTask.php new file mode 100644 index 0000000..37d76a5 --- /dev/null +++ b/Mage/Task/Newcraft/Communication/ConfirmEnvironmentTask.php @@ -0,0 +1,32 @@ +'.$this->getConfig()->getEnvironment().'! Sure? (Y/N)... ', 3, 0); + $answer = strtoupper(Console::readInput()); + Console::output('Cont... '.$this->getName().' ... ', 2, 0); + return 'Y' === $answer; + } +} \ No newline at end of file