Resolve VS Code config paths beside SSH config
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s

This commit is contained in:
DuProcess
2026-07-16 22:41:05 -04:00
parent d471d9576a
commit 569a3e9ce5
2 changed files with 41 additions and 3 deletions
+22
View File
@@ -7,6 +7,7 @@ const path = require('node:path');
const {
expandHomePath,
ensureInclude,
resolveGeneratedSshConfigPath,
shellQuote,
sshBlock,
sshConfigPathWord,
@@ -101,6 +102,27 @@ test('home-relative generated config paths expand for POSIX and Windows', () =>
);
});
test('relative generated config paths resolve beside the main ssh config', () => {
assert.equal(
resolveGeneratedSshConfigPath(
'/Users/palav/.ssh/config',
'config.dosh',
'/Users/palav',
'darwin'
),
'/Users/palav/.ssh/config.dosh'
);
assert.equal(
resolveGeneratedSshConfigPath(
'C:\\Users\\palav\\.ssh\\config',
'dosh\\config.dosh',
'C:\\Users\\palav',
'win32'
),
'C:\\Users\\palav\\.ssh\\dosh\\config.dosh'
);
});
test('config writers create missing parent directories', () => {
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'dosh-vscode-'));
const mainConfig = path.join(root, 'ssh', 'config');