Print a message to the user and exit(1) if HOME is not set in the users environment.

Originally committed to SVN as r5324.
This commit is contained in:
Amar Takhar 2011-02-08 22:40:55 +00:00
parent 436ea23e4c
commit c603c21b86

View file

@ -38,7 +38,8 @@ const std::string home() {
char *ehome; char *ehome;
ehome = getenv("HOME"); ehome = getenv("HOME");
if (ehome == NULL) { if (ehome == NULL) {
//XXX: explode here. printf("The HOME environment variable must be set\n");
exit(1);
} }
std::string home(ehome); std::string home(ehome);
free(ehome); free(ehome);