Bug 617436

Summary: guestfish: fails to tilde expand '~' when the $HOME env is unset
Product: [Community] Virtualization Tools Reporter: Jinxin Zheng <jzheng>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 617440 (view as bug list) Environment:
Last Closed: 2011-04-12 17:33:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 617440    

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.