From 3bc622b2508b6299f340befabad405da4542c308 Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 24 Feb 2008 02:44:45 +0000 Subject: [PATCH] Implementing non-interactive mode in console scripts git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6470 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/console/libs/shell.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index f83ed59a7..f144849bb 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -295,7 +295,11 @@ class Shell extends Object { * @access public */ function in($prompt, $options = null, $default = null) { + if (!$this->interactive) { + return $default; + } $in = $this->Dispatch->getInput($prompt, $options, $default); + if ($options && is_string($options)) { if (strpos($options, ',')) { $options = explode(',', $options);