CLI framework should accept input

Bug #851638 reported by Andrew Nicols
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Triaged
Wishlist
Unassigned

Bug Description

The CLI framework should allow for developers to ask users for input. For example:

  $sure = $cli->get_input(get_string('areyousure'));

  switch ($sure) {
    case('yes'):
    case('y'):
      // Do something
    default:
      // Don't do it
  }

I believe that Moodle does this (it's used in the upgrade CLI script)

Tags: cli
Changed in mahara:
importance: Undecided → Wishlist
Changed in mahara:
status: New → Triaged
Revision history for this message
François Marier (fmarier) wrote :

Actually, I'm not sure we should do this. I mean part of the beauty of the cli installer is that we can use it to fully automate the installation/upgrade of Mahara (e.g. hopefully in the Debian package soon!).

Prompting for input would break this very desirable (in my opinion) feature of your existing solution.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.