Bug 1399052 - HOME envirionment variable must not have / in the end
Summary: HOME envirionment variable must not have / in the end
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Rory Thrasher
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-28 07:38 UTC by Sangyong Gwak
Modified: 2017-06-01 01:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-31 18:22:11 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Sangyong Gwak 2016-11-28 07:38:33 UTC
Description of problem:
$HOME has '/' in the end. It must not have '/' in the end.

[perldancer2openshift-imyaman.rhcloud.com ~]\> echo $HOME
/var/lib/openshift/583bbd1a89f5cf56a100000f    <- right
/var/lib/openshift/583bbd1a89f5cf56a100000f/   <- not right


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


How reproducible: everytime


Steps to Reproduce:
1.rhc ssh -a perldancer2openshift
2.(after login) echo $HOME
3.you see "/var/lib/openshift/583bbd1a89f5cf56a100000f/"

Actual results:
"/var/lib/openshift/583bbd1a89f5cf56a100000f/"

Expected results:
"/var/lib/openshift/583bbd1a89f5cf56a100000f"

Additional info:

Comment 1 Rory Thrasher 2016-11-30 20:11:47 UTC
Hi there Sangyong,

Why does the HOME variable need to not have a trailing slash?  If I recall correctly, any number of successive slashes (except for // at the beginning in some rare cases) should be treated as if it were a single slash.

So `ls /home/thrasher/` and `ls /home/thrasher//` are the same.

Where is the trailing slash causing a problem for you?


Rory

Comment 2 Eric Paris 2017-05-31 18:22:11 UTC
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.

Comment 3 Sangyong Gwak 2017-06-01 01:09:33 UTC
Thank you for replies. I'm sorry for late respond. This is not urgent problem. 

But... most documents explains like this.
cd $HOME/.ssh
if [ -d $HOME/.ssh ] ; 

We don't use 
cd $HOME.ssh
if [ -d $HOME.ssh ] ; 

Because it is common that $HOME doesn't have / in the end.

And tests like this will fail.
if [ "$HOME/.ssh" == "/home/imyaman/.ssh" ] ;


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