sarugaku / shellingham

Tool to Detect Surrounding Shell
ISC License
227 stars 33 forks source link

unsupported proc format #78

Closed dnlserrano closed 1 year ago

dnlserrano commented 1 year ago

Running an Apple M1 Pro, I started to get

unsupported proc format

as part of running poetry shell

Upon digging, I found this library and saw fairly recent updates. After downgrading from 1.5.2 to 1.5.0, issues is gone.

Have you maybe introduced a regression for M1s?

uranusjr commented 1 year ago

Pull requests would be welcomed.

alsyia commented 1 year ago

We're observing that same issue on Intel Mac devices. It bubbles up through Poetry, breaking some of its functions.

@uranusjr I could look into a PR, but I'm not sure what the fix would be as neither of this file apparently exist on Macs?

OnurErgin commented 1 year ago

I confirm this bug too.

The bug is in the proc.py:30

    for name in ("stat", "status"):
        if os.path.exists(os.path.join("/proc", str(pid), name)):
            return name
    raise ProcFormatError("unsupported proc format")

Since MacOS systems do not contain a "/proc" file system, the script is always raising the error.

sneakers-the-rat commented 1 year ago

fixed this - https://github.com/sarugaku/shellingham/pull/79

uranusjr commented 1 year ago

1.5.3 has been released.

dnlserrano commented 1 year ago

Thanks for the very speedy fix folks! ❤️