diff --git a/tools/virsh.c b/tools/virsh.c index e35637d0f635c275e2c91252c8962389a9c38f55..a38750ffc849a95bd3e68d6dc8e31edd39eaf3db 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -12624,8 +12624,10 @@ vshReadlineInit(vshControl *ctl) /* Prepare to read/write history from/to the ~/.virsh/history file */ userdir = virGetUserDirectory(getuid()); - if (userdir == NULL) + if (userdir == NULL) { + vshError(ctl, "%s", _("Could not determine home directory")); return -1; + } if (virAsprintf(&ctl->historydir, "%s/.virsh", userdir) < 0) { vshError(ctl, "%s", _("Out of memory"));