Menu

#34 Directory might falsly be identified as program to launch

v1.0 (example)
closed
nobody
None
5
2014-06-03
2013-07-26
Jan Gosmann
No

pexpect.spawn will try to find the absolute path to the command with the 'which' function. In this function it is only checked that discovered files have the executable bit set. I think, it should also be checked whether it is an actual file (or a directory).

At the moment it is possible that a directory in the search path hides an executable with the same name resulting in an OSError exception ('permission denied').

Discussion

  • Thomas Kluyver

    Thomas Kluyver - 2014-06-03

    This has been addressed on Github, so I'm closing this issue.

    https://github.com/pexpect/pexpect/pull/62

     
  • Thomas Kluyver

    Thomas Kluyver - 2014-06-03
    • status: open --> closed
     

Log in to post a comment.