mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 21:40:03 +00:00
Adding env handlement for ssh profile sessions (#6242)
This commit is contained in:
parent
58f2c3d081
commit
25f5cf04ea
@ -306,6 +306,14 @@ export class SSHSession {
|
|||||||
this.authUsername = 'root'
|
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({
|
ssh.connect({
|
||||||
host: this.profile.options.host.trim(),
|
host: this.profile.options.host.trim(),
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"tabby-*": ["../../tabby-*"],
|
"tabby-*": ["../../tabby-*"],
|
||||||
"*": ["../../app/node_modules/*"]
|
"*": ["../../app/node_modules/*"]
|
||||||
}
|
},
|
||||||
|
"types": ["node"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user