mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
Add ZDOTDIR after JWT token for WSL commands (#1546)
This commit is contained in:
parent
f5305cc8dd
commit
799aecd501
@ -167,9 +167,6 @@ func StartWslShellProc(ctx context.Context, termSize waveobj.TermSize, cmdStr st
|
||||
homeDir := wsl.GetHomeDir(conn.Context, client)
|
||||
shellOpts = append(shellOpts, "~", "-d", client.Name())
|
||||
|
||||
if isZshShell(shellPath) {
|
||||
shellOpts = append(shellOpts, fmt.Sprintf(`ZDOTDIR="%s/.waveterm/%s"`, homeDir, shellutil.ZshIntegrationDir))
|
||||
}
|
||||
var subShellOpts []string
|
||||
|
||||
if cmdStr == "" {
|
||||
@ -216,6 +213,10 @@ func StartWslShellProc(ctx context.Context, termSize waveobj.TermSize, cmdStr st
|
||||
} else {
|
||||
shellOpts = append(shellOpts, "--", fmt.Sprintf(`%s=%s`, wshutil.WaveJwtTokenVarName, jwtToken))
|
||||
}
|
||||
|
||||
if isZshShell(shellPath) {
|
||||
shellOpts = append(shellOpts, fmt.Sprintf(`ZDOTDIR="%s/.waveterm/%s"`, homeDir, shellutil.ZshIntegrationDir))
|
||||
}
|
||||
shellOpts = append(shellOpts, shellPath)
|
||||
shellOpts = append(shellOpts, subShellOpts...)
|
||||
log.Printf("full cmd is: %s %s", "wsl.exe", strings.Join(shellOpts, " "))
|
||||
|
Loading…
Reference in New Issue
Block a user