elevation icon indicating copy to clipboard operation
elevation copied to clipboard

Selfcheck fails to use curl 7.15.5 because curl --version has non-zero exit status

Open kundor opened this issue 8 years ago • 2 comments

On my system, I have an old version of curl (7.15.5.) Running curl --version exits with a status of 2.

eio selfcheck runs the code (line 38 of util.py)

        try:
            subprocess.check_output(check_cli, shell=True, stderr=subprocess.STDOUT)
        except subprocess.CalledProcessError:
            msg.append('%r not found or not usable.' % tool_name)

which fails then, even though curl is available.

Perhaps you could instead do something like

        try:
            subprocess.call(check_cli.split(), stderr=subprocess.STDOUT)
        except OSError:
            msg.append('%r not found or not usable.' % tool_name)

kundor avatar Dec 05 '16 22:12 kundor

Sorry for being so late. I really like your suggestion, thanks!

alexamici avatar Jul 20 '17 09:07 alexamici

@kundor unfortunately your suggestion or other variations that I tried don't work. The only possibility is to call curl --help instead of --version, can you test is it works for you?

alexamici avatar Jul 20 '17 09:07 alexamici