Commit Graph

3 Commits

Author SHA1 Message Date
Frantisek Hrbata
65d18fce4c fix(activate): use exe instead of comm for parent shell detection
Currently, we are using psutil.Process().name(), which includes the
command as entered on the command line. This becomes an issue if the
export script is initiated within another script.

run.sh

    #!/usr/bin/bash
    . ./export.sh

In this case the activate script will see `run.sh` instead of bash.

/proc/<pid>/com vs /proc/<pid>/exe

Use exe(), which contains the full executable path to fix this.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-09-06 15:58:24 +02:00
Marek Fiala
24ae042bba fix(tools): Corrected detect_shell
When comparing process name with python,
lowercase the process name in condition.
2024-09-06 11:11:50 +02:00
Marek Fiala
88527faff8 feat(tools): Added Windows shells support + refactoring 2024-09-05 10:13:04 +02:00