Bug 997741 - The usage info of oo-admin-upgrade is incompletedly printed to screen
The usage info of oo-admin-upgrade is incompletedly printed to screen
Status: CLOSED WONTFIX
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Ben Parees
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-16 02:28 EDT by Jianwei Hou
Modified: 2015-05-14 20:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-18 16:18:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jianwei Hou 2013-08-16 02:28:15 EDT
Description of problem:
Run 'oo-admin-upgrade -h', the usage info is displayed, but the descriptions for each task are not fully printed. Therefore, the user can not understand what each task does.

Version-Release number of selected component (if applicable):
On devenv_3660

How reproducible:
Always

Steps to Reproduce:
1. oo-admin-upgrade --help


Actual results:
[root@ip-10-82-221-18 ~]# oo-admin-upgrade --help
Tasks:
  oo-admin-upgrade archive                                                                                       # Archives existing upg...
  oo-admin-upgrade help [TASK]                                                                                   # Describe available ta...
  oo-admin-upgrade upgrade-from-file --upgrade-file=UPGRADE_FILE                                                 # Upgrades gears from a...
  oo-admin-upgrade upgrade-gear --app-name=APP_NAME --login=LOGIN --upgrade-gear=UPGRADE_GEAR --version=VERSION  # Upgrades only the spe...
  oo-admin-upgrade upgrade-node --version=VERSION                                                                # Upgrades one or all n...


The descriptions to each task are incompletely printed to screen

Expected results:
The descriptions should be fully printed out.

Additional info:
This problem depends on the font size of a terminal, however, in previous version, the text will be printed at 2nd line it it has hit the end of current line. So I think this is still a tiny issue.
Comment 1 Ben Parees 2013-11-18 16:18:01 EST
The truncation behavior is baked into thor in thor.rb:


def help(shell, subcommand = false)
      list = printable_tasks(true, subcommand)
      Thor::Util.thor_classes_in(self).each do |klass|
        list += klass.printable_tasks(false)
      end
      list.sort!{ |a,b| a[0] <=> b[0] }

      shell.say "Tasks:"
      shell.print_table(list, :ident => 2, :truncate => true)
      shell.say
      class_options_help(shell)
    end

And it appears to have always been this way (based on the file history), so I'm not sure why you're only seeing this behavior now.  

In any case, pending Thor introducing the ability to override/configure the truncation option, this behavior is going to stay as is.

Note You need to log in before you can comment on or make changes to this bug.