mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-05 06:24:56 +00:00
Adding env handlement for ssh profile sessions (#6242)
This commit is contained in:
@@ -306,6 +306,14 @@ export class SSHSession {
|
||||
this.authUsername = 'root'
|
||||
}
|
||||
}
|
||||
if (this.authUsername?.startsWith('$')) {
|
||||
try {
|
||||
const result = process.env[this.authUsername.slice(1)]
|
||||
this.authUsername = result ?? this.authUsername
|
||||
} catch {
|
||||
this.authUsername = 'root'
|
||||
}
|
||||
}
|
||||
|
||||
ssh.connect({
|
||||
host: this.profile.options.host.trim(),
|
||||
|
Reference in New Issue
Block a user