Skip to content

Commit fd80034

Browse files
authored
src/ssh: fix default username seting (#334)
We were mistakenly checking `defaultUser` instead of `defaultUsername`
1 parent fd26acf commit fd80034

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/ssh.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ export class SSH {
127127
public sshHostnameWithUser(hostname: string) {
128128
const { hosts } = this.configManager?.config || {};
129129
const userForHost = hosts?.[hostname]?.user?.trim();
130-
const defaultUser = vscode.workspace.getConfiguration('ssh').get<string>('defaultUser')?.trim();
130+
const defaultUser = vscode.workspace
131+
.getConfiguration('ssh')
132+
.get<string>('defaultUsername')
133+
?.trim();
131134

132135
const user = userForHost || defaultUser;
133136
return user ? `${user}@${hostname}` : hostname;

src/utils/host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function getUsername(configManager: ConfigManager, hostname: string) {
77
const userForHost = hosts?.[hostname]?.user?.trim();
88
const defaultUser = vscode.workspace
99
.getConfiguration('tailscale')
10-
.get<string>('ssh.defaultUser')
10+
.get<string>('ssh.defaultUsername')
1111
?.trim();
1212

1313
return userForHost || defaultUser || userInfo().username;

0 commit comments

Comments
 (0)