Skip to content

Commit 1b4f5eb

Browse files
Fix empty SSH config file (#19)
1 parent a3eaac8 commit 1b4f5eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ssh/sshConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ export default class SSHConfiguration {
2929
const sshConfigPath = getSSHConfigPath();
3030
let content = '';
3131
if (await fileExists(sshConfigPath)) {
32-
content = await fs.promises.readFile(sshConfigPath, 'utf8');
32+
content = (await fs.promises.readFile(sshConfigPath, 'utf8')).trim();
3333
}
3434
const config = SSHConfig.parse(content);
3535

3636
if (await fileExists(systemSSHConfig)) {
37-
content = await fs.promises.readFile(systemSSHConfig, 'utf8');
37+
content = (await fs.promises.readFile(systemSSHConfig, 'utf8')).trim();
3838
config.push(...SSHConfig.parse(content));
3939
}
4040

0 commit comments

Comments
 (0)