1
0
mirror of https://github.com/moparisthebest/gpgit synced 2024-08-13 15:53:50 -04: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();