File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1739,7 +1739,11 @@ sub read_config_file {
1739
1739
$config_file ||= _home_dir() . " /.rex/config.yml" ;
1740
1740
1741
1741
if ( -f $config_file ) {
1742
- my $yaml = eval { local ( @ARGV , $/ ) = ($config_file ); <>; };
1742
+ my $yaml = eval {
1743
+ use IO::File;
1744
+ my $fh = IO::File-> new( $config_file , ' r' );
1745
+ join ' ' , $fh -> getlines();
1746
+ };
1743
1747
eval { $HOME_CONFIG_YAML = Load($yaml ); };
1744
1748
1745
1749
if ($@ ) {
@@ -1762,7 +1766,11 @@ sub read_ssh_config_file {
1762
1766
$config_file ||= _home_dir() . ' /.ssh/config' ;
1763
1767
1764
1768
if ( -f $config_file ) {
1765
- my @lines = eval { local (@ARGV ) = ($config_file ); <>; };
1769
+ my @lines = eval {
1770
+ use IO::File;
1771
+ my $fh = IO::File-> new( $config_file , ' r' );
1772
+ join ' ' , $fh -> getlines();
1773
+ };
1766
1774
%SSH_CONFIG_FOR = _parse_ssh_config(@lines );
1767
1775
}
1768
1776
}
You can’t perform that action at this time.
0 commit comments