mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
use interactive shell for environment
This commit is contained in:
parent
09a072f900
commit
8274d19e0b
@ -1170,7 +1170,7 @@ func GetCurrentState() (string, []byte, error) {
|
||||
return "", nil, fmt.Errorf("cannot find local mshell executable: %w", err)
|
||||
}
|
||||
ctx, _ := context.WithTimeout(context.Background(), GetStateTimeout)
|
||||
ecmd := exec.CommandContext(ctx, "bash", "-l", "-c", fmt.Sprintf("%s --env", shellescape.Quote(execFile)))
|
||||
ecmd := exec.CommandContext(ctx, "bash", "-l", "-i", "-c", fmt.Sprintf("%s --env", shellescape.Quote(execFile)))
|
||||
outputBytes, err := ecmd.Output()
|
||||
if err != nil {
|
||||
errMsg := getStderr(err)
|
||||
|
Loading…
Reference in New Issue
Block a user