File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 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 {
17391739 $config_file ||= _home_dir() . " /.rex/config.yml" ;
17401740
17411741 if ( -f $config_file ) {
1742- my $yaml = eval { local ( @ARGV , $/ ) = ($config_file ); <>; };
1742+ my $yaml = do {
1743+ use IO::File;
1744+ my $fh = IO::File-> new( $config_file , ' r' );
1745+ join ' ' , $fh -> getlines();
1746+ };
17431747 eval { $HOME_CONFIG_YAML = Load($yaml ); };
17441748
17451749 if ($@ ) {
@@ -1762,7 +1766,11 @@ sub read_ssh_config_file {
17621766 $config_file ||= _home_dir() . ' /.ssh/config' ;
17631767
17641768 if ( -f $config_file ) {
1765- my @lines = eval { local (@ARGV ) = ($config_file ); <>; };
1769+ my @lines = do {
1770+ use IO::File;
1771+ my $fh = IO::File-> new( $config_file , ' r' );
1772+ join ' ' , $fh -> getlines();
1773+ };
17661774 %SSH_CONFIG_FOR = _parse_ssh_config(@lines );
17671775 }
17681776}
You can’t perform that action at this time.
0 commit comments