mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-20 16:59:06 +00:00
Merge pull request #150 from tmancill/perl-issue-20103
Don't try to open a directory as the config file
This commit is contained in:
commit
618602f496
2 changed files with 4 additions and 4 deletions
|
@ -314,7 +314,7 @@ sub load_configs {
|
|||
$ENV{HOME} . '/.clusterssh/config',
|
||||
)
|
||||
{
|
||||
$self->parse_config_file($config) if ( -e $config );
|
||||
$self->parse_config_file($config) if ( -e $config && ! -d _ );
|
||||
}
|
||||
|
||||
# write out default config file if necesasry
|
||||
|
@ -329,10 +329,10 @@ sub load_configs {
|
|||
# relative to config directory
|
||||
for my $config (@configs) {
|
||||
next unless ($config); # can be null when passed from Getopt::Long
|
||||
$self->parse_config_file($config) if ( -e $config );
|
||||
$self->parse_config_file($config) if ( -e $config && ! -d _ );
|
||||
|
||||
my $file = $ENV{HOME} . '/.clusterssh/config_' . $config;
|
||||
$self->parse_config_file($file) if ( -e $file );
|
||||
$self->parse_config_file($file) if ( -e $file && ! -d _ );
|
||||
}
|
||||
|
||||
return $self;
|
||||
|
|
|
@ -535,7 +535,7 @@ SKIP: {
|
|||
chmod( 0755, $ENV{HOME} . '/.csshrc.DISABLED', $ENV{HOME} );
|
||||
}
|
||||
|
||||
note('check failure to write default config is caught');
|
||||
note('check failure to write default config is caught when loading config');
|
||||
$ENV{HOME} = tempdir( CLEANUP => 1 );
|
||||
mkdir( $ENV{HOME} . '/.clusterssh' );
|
||||
mkdir( $ENV{HOME} . '/.clusterssh/config' );
|
||||
|
|
Loading…
Add table
Reference in a new issue