Skip to content

unexpected behavior in case of 'command not found' #529

@prometheus-0017

Description

@prometheus-0017
import pyte
from winpty import PtyProcess
try:
    print('hihi')
    PtyProcess.spawn('pnpm -v')
except Exception as e:
    print('oo')
    print(e)
print('ha')
import os
print(os.environ.get('pa_th','2'))

there are 3 points:
1,command not found when ptyprocess spawning
2,os.environ.get is called with default value
3,this env variable doesn't exist actually

current behavior:
program blocked on "os.environ.get"

version:
win11
python 3.12.0
pywinpty 3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions