]> git.proxmox.com Git - pve-client.git/commitdiff
Remove the File::HomeDir requirement
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 5 Jun 2018 10:06:31 +0000 (12:06 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 5 Jun 2018 10:07:09 +0000 (12:07 +0200)
Simply use $ENV{HOME} instead.

PVE/APIClient/Config.pm

index 8a7784896f7d881fc93fef3eb7d4bf3cc91658ed..65c555fdc21a7dd6a8058d13617efd1e1a0eb1c8 100644 (file)
@@ -4,7 +4,6 @@ use strict;
 use warnings;
 use JSON;
 
-use File::HomeDir ();
 use PVE::JSONSchema qw(register_standard_option get_standard_option);
 use PVE::SectionConfig;
 use PVE::Tools qw(file_get_contents file_set_contents);
@@ -90,7 +89,11 @@ sub private {
 sub config_filename {
     my ($class) = @_;
 
-    return File::HomeDir::home() . '/.pveclient';
+    my $home = $ENV{HOME};
+
+    die "environment HOME not set\n" if !defined($home);
+
+    return "$home/.pveclient";
 }
 
 sub load {