@@ -148,12 +148,10 @@ func (pp *PipePty) WriteString(s string) (n int, err error) {
148
148
}
149
149
150
150
func StartWslShellProc (ctx context.Context , termSize waveobj.TermSize , cmdStr string , cmdOpts CommandOptsType , conn * wsl.WslConn ) (* ShellProc , error ) {
151
- shellProcCtx , cancelFn := context .WithCancel (ctx )
152
- defer cancelFn ()
153
151
client := conn .GetClient ()
154
152
shellPath := cmdOpts .ShellPath
155
153
if shellPath == "" {
156
- remoteShellPath , err := wsl .DetectShell (shellProcCtx , client )
154
+ remoteShellPath , err := wsl .DetectShell (ctx , client )
157
155
if err != nil {
158
156
return nil , err
159
157
}
@@ -162,13 +160,13 @@ func StartWslShellProc(ctx context.Context, termSize waveobj.TermSize, cmdStr st
162
160
var shellOpts []string
163
161
log .Printf ("detected shell: %s" , shellPath )
164
162
165
- err := wsl .InstallClientRcFiles (shellProcCtx , client )
163
+ err := wsl .InstallClientRcFiles (ctx , client )
166
164
if err != nil {
167
165
log .Printf ("error installing rc files: %v" , err )
168
166
return nil , err
169
167
}
170
168
171
- homeDir := wsl .GetHomeDir (shellProcCtx , client )
169
+ homeDir := wsl .GetHomeDir (ctx , client )
172
170
shellOpts = append (shellOpts , "~" , "-d" , client .Name ())
173
171
174
172
var subShellOpts []string
0 commit comments