Bug 617436 - guestfish: fails to tilde expand '~' when the $HOME env is unset
Summary: guestfish: fails to tilde expand '~' when the $HOME env is unset
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 617440
TreeView+ depends on / blocked
 
Reported: 2010-07-23 03:08 UTC by Jinxin Zheng
Modified: 2011-04-12 17:33 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
: 617440 (view as bug list)
Environment:
Last Closed: 2011-04-12 17:33:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Jinxin Zheng 2010-07-23 03:08:38 UTC
Description of problem:
When the environment variable $HOME is unset, bash can still expand ~ to current user's home path. But guestfish cannot.

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

How reproducible:
Always

Steps to Reproduce:

$ unset HOME

$ echo ~
/root

$ guestfish <<EOF
echo ~
EOF
~


Actual results:
~

Expected results:
/root

Additional info:
It would be nice to try expanding ~ from the host's passwd file when HOME is unset.

Comment 1 Richard W.M. Jones 2011-04-12 17:33:36 UTC
Fixed upstream in commit
7ce627fce02eae8c7db36b4090fa0ce1bf69bf44.


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