diff --git a/bin/stow.in b/bin/stow.in index 84dfbd2..e33a4a6 100755 --- a/bin/stow.in +++ b/bin/stow.in @@ -662,7 +662,11 @@ sub check_packages { #============================================================================= sub get_config_file_options { my @defaults = (); - for my $file ("$ENV{HOME}/.stowrc", '.stowrc') { + my @dirlist = ('.stowrc'); + if (defined($ENV{HOME})) { + unshift(@dirlist, "$ENV{HOME}/.stowrc"); + } + for my $file (@dirlist) { if (-r $file) { open my $FILE, '<', $file or die "Could not open $file for reading\n";