We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0dac016 + 77907e4 commit d590e81Copy full SHA for d590e81
src/Ssh/SshConfigFileConfiguration.php
@@ -60,7 +60,8 @@ protected function parseSshConfigFile($file)
60
$configs = array();
61
$lineNumber = 1;
62
foreach (explode(PHP_EOL, $contents) as $line) {
63
- if (trim($line) == '' || $line[0] == '#') {
+ $line = trim($line);
64
+ if ($line == '' || $line[0] == '#') {
65
continue;
66
}
67
$pos = strpos($line, '=');
tests/Ssh/Fixtures/config_valid
@@ -5,7 +5,7 @@ Port 1234
5
#This is a comment which won't appear in the parsed array
6
7
Host test
8
-HostName test.com
+ HostName test.com
9
10
Host testuser.com
11
User test
@@ -21,4 +21,4 @@ IdentityFile ~/identity
21
Host ta*
22
User bob
23
Port = 12345
24
+HostName test.com
0 commit comments