1
0
mirror of https://github.com/moparisthebest/gpgit synced 2024-11-11 11:45:00 -05:00

Set the HOME environment variable to match the homedir of the user

running the script, so that the .gnupg folder can be found easily.
This commit is contained in:
Mike Cardwell 2011-09-27 14:21:11 +01:00
parent 717df71317
commit 05497a558c

View File

@ -49,6 +49,9 @@ use MIME::Parser;
die "Missing recipients\n" unless @recipients;
}
## Set the home environment variable from the user running the script
$ENV{HOME} = (getpwuid($>))[7];
## Object for GPG encryption
my $gpg = new Mail::GnuPG();