Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix run on non-Windows environments #25

Closed
wants to merge 2 commits into from
Closed

Fix run on non-Windows environments #25

wants to merge 2 commits into from

Commits on Oct 22, 2018

  1. Simplify subprocess spawning

    Previously, the command was first executed once, and if that resulted in
    a certain WindowsError, then the command was retried in shell mode. The
    intention was to support Windows' file associations for file launch.
    However, this causes problems in non-Windows environments, as
    WindowsError exception is not defined.
    
    Trying to catch a WindowsError exception is unnecessary for file
    associations, as non-executable files are already run in shell mode on
    the first try. This change simplifies the logic, still supporting direct
    execution for executables and shell mode for shell builtins and Window's
    file launch.
    
    Fixes #18.
    kalkie committed Oct 22, 2018
    Configuration menu
    Copy the full SHA
    2327f56 View commit details
    Browse the repository at this point in the history
  2. Use shutil.which for more accurate executable finding

    Shutil which gives more accurate results than distutils find_executable,
    e.g. it checks if the result is marked as an executable or not.
    kalkie committed Oct 22, 2018
    Configuration menu
    Copy the full SHA
    69e6d41 View commit details
    Browse the repository at this point in the history