Bug 1026180

Summary: when run `rhc env set= -a $appname`, it return ok and new-added variables can list under `rhc env list `
Product: OpenShift Online Reporter: weiwei jiang <wjiang>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: dmcphers, jliggitt, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-11 21:41:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description weiwei jiang 2013-11-04 06:33:09 UTC
Description of problem:
when add a env var via `rhc env set= -a $appname`, it return ok, and new-added variables can list under `rhc env list`
# rhc env set= -a app1
Setting environment variable(s) ... done
# rhc env list -a app1
set=

But `rhc env-set= -a $appname` can not add successfully.


Version-Release number of selected component (if applicable):
STG(devenv-stage_549) 
rhc 1.16.9
How reproducible:
always


Steps to Reproduce:
1.Create an app
2.set variables like following:
rhc env set= -a $appname
3.check variables under `rhc env list`

Actual results:
# rhc env set= -a app1
Setting environment variable(s) ... done
# rhc env list -a app1
set=

Expected results:
It can not add successfully.

Additional info:

Comment 1 Jordan Liggitt 2014-07-11 19:52:58 UTC
`rhc env set= -a app1` should be invalid syntax. Instead, it is matching the `rhc env set` command, then treating "set=" as an argument as well.

Problem is in Commander::Runner.valid_command_names_from, which matches the full command against word boundaries, so "env set\b" matches "env set=". A bug against Commander is probably in order.