Bug 617436 - guestfish: fails to tilde expand '~' when the $HOME env is unset
guestfish: fails to tilde expand '~' when the $HOME env is unset
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks: 617440
  Show dependency treegraph
 
Reported: 2010-07-22 23:08 EDT by Jinxin Zheng
Modified: 2011-04-12 13:33 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 617440 (view as bug list)
Environment:
Last Closed: 2011-04-12 13:33:36 EDT
Type: ---
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 Jinxin Zheng 2010-07-22 23:08:38 EDT
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 13:33:36 EDT
Fixed upstream in commit
7ce627fce02eae8c7db36b4090fa0ce1bf69bf44.

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