coala / coala-bears

Bears for coala
https://coala.io/
GNU Affero General Public License v3.0
295 stars 580 forks source link

AlexBear fails alex detection on Windows #2922

Open jayvdb opened 5 years ago

jayvdb commented 5 years ago

The alex package could not be verified. Please ensure that the package that has been installed is the one to 'Catch insensitive, inconsiderate writing'. This can be verified by running alex --help and seeing what it does.

When I print the exception, it is

[WinError 2] The system cannot find the file specified

However alex.cmd is in node_modules/.bin , and alex --help on the command line works.

jayvdb commented 5 years ago

To debug I changes

        except (OSError, subprocess.CalledProcessError):
            return ('The `alex` package could not be verified. ' +
                    incorrect_pkg_msg)

to be

        except (OSError, subprocess.CalledProcessError) as e:
            return ('The `alex` package could not be verified. {}\n{}'
                    ''.format(e, incorrect_pkg_msg))

This needs to be done as part of this fix.