Bug 1470997

Summary: oc edit should fall back to EDITOR if OC_EDITOR is not specified
Product: OpenShift Container Platform Reporter: Marko Myllynen <myllynen>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED NOTABUG QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: medium    
Version: 3.6.0CC: aos-bugs, jokerman, jvallejo, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-24 17:11:45 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 Marko Myllynen 2017-07-14 08:51:04 UTC
Description of problem:
EDITOR is widely used to specify an alternative editor to be used with various commands, it would be nice if oc edit could fall back to EDITOR in case OC_EDITOR has not been specified.

Comment 1 Juan Vallejo 2017-08-24 17:11:45 UTC
Right now, it is the case that we fall back to the EDITOR environment variable if OC_EDITOR is not set [1]

1. https://github.com/openshift/origin/blob/master/pkg/cmd/util/clientcmd/factory_client_access.go#L385

Closing this as NOTABUG, but feel free to re-open if I have missed something about this.

Comment 2 Marko Myllynen 2017-08-28 10:22:56 UTC
(In reply to Juan Vallejo from comment #1)
> Right now, it is the case that we fall back to the EDITOR environment
> variable if OC_EDITOR is not set [1]
> 
> 1.
> https://github.com/openshift/origin/blob/master/pkg/cmd/util/clientcmd/
> factory_client_access.go#L385
> 
> Closing this as NOTABUG, but feel free to re-open if I have missed something
> about this.

Correct, I think it was me who missed something while testing, this looks exactly what I hoped for. Thanks!