mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-27 10:42:35 +03:00
ssh: use correct profile's login scripts - fixes #6064
This commit is contained in:
parent
9c6acf99d0
commit
358a7563f6
@ -200,7 +200,7 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
|
||||
return
|
||||
}
|
||||
|
||||
const session = new SSHShellSession(this.injector, this.sshSession)
|
||||
const session = new SSHShellSession(this.injector, this.sshSession, this.profile)
|
||||
this.setSession(session)
|
||||
this.attachSessionHandler(session.serviceMessage$, msg => {
|
||||
msg = msg.replace(/\n/g, '\r\n ')
|
||||
|
@ -11,7 +11,6 @@ import { SSHProfile } from '../api'
|
||||
|
||||
export class SSHShellSession extends BaseSession {
|
||||
shell?: ClientChannel
|
||||
private profile: SSHProfile
|
||||
get serviceMessage$ (): Observable<string> { return this.serviceMessage }
|
||||
private serviceMessage = new Subject<string>()
|
||||
private ssh: SSHSession|null
|
||||
@ -19,10 +18,10 @@ export class SSHShellSession extends BaseSession {
|
||||
constructor (
|
||||
injector: Injector,
|
||||
ssh: SSHSession,
|
||||
private profile: SSHProfile,
|
||||
) {
|
||||
super(injector.get(LogService).create(`ssh-shell-${ssh.profile.options.host}-${ssh.profile.options.port}`))
|
||||
super(injector.get(LogService).create(`ssh-shell-${profile.options.host}-${profile.options.port}`))
|
||||
this.ssh = ssh
|
||||
this.profile = ssh.profile
|
||||
this.setLoginScriptsOptions(this.profile.options)
|
||||
this.ssh.serviceMessage$.subscribe(m => this.serviceMessage.next(m))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user