fix(pty): load omp status extension in wsl shells (#7642)

Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
This commit is contained in:
Rod Boev
2026-07-07 21:24:08 -07:00
committed by GitHub
co-authored by Orca Brennan Benson
parent 2ce77d9098
commit a09a00f066
9 changed files with 148 additions and 31 deletions
@@ -117,6 +117,14 @@ describe('wsl login shell command helpers', () => {
expect(command).toContain('getent passwd')
expect(command).toContain('if [ -z "$_orca_wsl_shell" ] || [ ! -x "$_orca_wsl_shell" ]; then')
expect(command).toContain('_orca_shell_ready_root=""')
expect(command).toContain('if [ -n "${ORCA_USER_DATA_PATH:-}" ]; then')
expect(command).toContain('_orca_wsl_shell_name=$(basename "$_orca_wsl_shell"')
expect(command).toContain('bash)')
expect(command).toContain('--rcfile "${_orca_shell_ready_root}/bash/rcfile"')
expect(command).toContain('zsh)')
expect(command).toContain('export ZDOTDIR="${_orca_shell_ready_root}/zsh"')
expect(command).toContain('exec "$_orca_wsl_shell" -l')
expectValidShSyntax(command)
})
})
+17
View File
@@ -45,6 +45,23 @@ export function buildWslInteractiveLoginShellCommand(): string {
'if [ -z "$_orca_wsl_shell" ] || [ ! -x "$_orca_wsl_shell" ]; then',
' _orca_wsl_shell=/bin/sh',
'fi',
'_orca_shell_ready_root=""',
'if [ -n "${ORCA_USER_DATA_PATH:-}" ]; then',
' _orca_shell_ready_root="${ORCA_USER_DATA_PATH%/}/shell-ready"',
'fi',
'_orca_wsl_shell_name=$(basename "$_orca_wsl_shell" | tr "[:upper:]" "[:lower:]")',
'case "$_orca_wsl_shell_name" in',
' bash)',
' if [ -n "${_orca_shell_ready_root:-}" ] && [ -f "${_orca_shell_ready_root}/bash/rcfile" ]; then',
' exec "$_orca_wsl_shell" --rcfile "${_orca_shell_ready_root}/bash/rcfile"',
' fi',
' ;;',
' zsh)',
' if [ -n "${_orca_shell_ready_root:-}" ] && [ -d "${_orca_shell_ready_root}/zsh" ]; then',
' export ZDOTDIR="${_orca_shell_ready_root}/zsh"',
' fi',
' ;;',
'esac',
'exec "$_orca_wsl_shell" -l'
].join('\n')
}