diff --git a/Mage/Command/BuiltIn/ReleasesCommand.php b/Mage/Command/BuiltIn/ReleasesCommand.php
index f20e052..4d8eded 100644
--- a/Mage/Command/BuiltIn/ReleasesCommand.php
+++ b/Mage/Command/BuiltIn/ReleasesCommand.php
@@ -28,6 +28,11 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
*/
public function run()
{
+ if (!is_numeric($this->getConfig()->getParameter('release', ''))) {
+ Console::output('This release is mandatory.', 1, 2);
+ return false;
+ }
+
$subcommand = $this->getConfig()->getArgument(1);
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock';
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
diff --git a/Mage/Command/BuiltIn/RollbackCommand.php b/Mage/Command/BuiltIn/RollbackCommand.php
index f852584..1b945ad 100644
--- a/Mage/Command/BuiltIn/RollbackCommand.php
+++ b/Mage/Command/BuiltIn/RollbackCommand.php
@@ -29,6 +29,11 @@ class RollbackCommand extends AbstractCommand implements RequiresEnvironment
public function run()
{
$releaseId = $this->getConfig()->getArgument(1);
+ if (!is_numeric($releaseId)) {
+ Console::output('This release is mandatory.', 1, 2);
+ return false;
+ }
+
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock';
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
Console::output('This environment is locked!', 1, 2);