Bug 856056 - Messages returned from CLI are messed up on windows 7
Messages returned from CLI are messed up on windows 7
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-11 01:30 EDT by Jianwei Hou
Modified: 2015-05-14 22:04 EDT (History)
2 users (show)

See Also:
Fixed In Version: 0.98.14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-17 17:29:56 EDT
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 2012-09-11 01:30:02 EDT
Description of problem:
run rhc command on windows 7, when some command fails, the messages returned are messed up

Version-Release number of selected component (if applicable):
OS: Windows 7
ruby 1.9.3
CLI: rhc-0.98.13

How reproducible:
Always

Steps to Reproduce:
1. Try to run 'rhc domain', 'rhc sshkey', 'rhc server' with some invalid arguments or make the command fail. 
rhc domain create -a 
rhc server
rhc sshkey add rsa id_rsa

  
Actual results:
C:\Users\window7\.ssh>rhc domain create -a
←[31minvalid option: -a←[0m
 
C:\Users\window7\.ssh>rhc server
←[32mAll systems running fine←[0m
 
C:\Users\window7\.ssh>rhc sshkey add rsa id_rsa
Password: ******
 
←[31mInvalid key type.  Valid types are ssh-rsa or ssh-dss.←[0m

Expected results:
The messages should be clear not messed up

Additional info:
Comment 1 Jianwei Hou 2012-09-11 07:48:37 EDT
This bug is also reproduced on Windows XP
Comment 2 John (J5) Palmieri 2012-09-11 09:52:34 EDT
Looks like windows disables ansi consoles by default.  I suggest turning off colors in highline for windows systems
Comment 3 John Poelstra 2012-09-11 13:06:26 EDT
fix pushed, will update this bug soon
Comment 4 John (J5) Palmieri 2012-09-11 19:33:44 EDT
We turn off colors for Windows now.  There is a FIXME to see if highline actually supports window console colors instead of just ANSI but it is low down in the list since the color console is simply an enhancement and not required.
Comment 5 Jianwei Hou 2012-09-11 22:40:05 EDT
Verified with rhc-0.98.14 on Windows 7

Step:
1. Try to run 'rhc domain', 'rhc sshkey', 'rhc server' with some invalid arguments or make the command fail. 
rhc domain create -a 
rhc server
rhc sshkey add rsa id_rsa

Result:
C:\Users\window7\.ssh>rhc domain create -a
invalid option: -a

C:\Users\window7\.ssh>rhc server
All systems running fine
 
C:\Users\window7\.ssh>rhc sshkey add rsakey id_rsa
Password: **
 
Invalid key type.  Valid types are ssh-rsa or ssh-dss.

Now the messages are clear, so verified.

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