This PR patches load_configs() to check that the $config being opened is actually (well, likely) a file and not a directory, which was tripping up the tests that assert that there is an error when the config file cannot be written because a directory already exists.
Until recently, the attempt to read the directory as a file was being silently ignored due to a latent bug in Perl; more about that in Debian bug report 10163690 and Perl 5 issue 20103
The -e $config && ! -d _ file test operators are used instead of -e $config && -f _ because it will still support users who might want to symlink their config file.
This PR patches
load_configs()
to check that the $config being opened is actually (well, likely) a file and not a directory, which was tripping up the tests that assert that there is an error when the config file cannot be written because a directory already exists.Until recently, the attempt to read the directory as a file was being silently ignored due to a latent bug in Perl; more about that in Debian bug report 10163690 and Perl 5 issue 20103
This addresses a bug filed against the Debian package for clusterssh when
t/15config.t
tests started failing after the Perl bug was fixed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026735The
-e $config && ! -d _
file test operators are used instead of-e $config && -f _
because it will still support users who might want to symlink theirconfig
file.