diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-12-11 07:59:01 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-12-11 07:59:01 +0200 |
commit | bef7aa273eef984c0ea49ffa3df61989e47af18e (patch) | |
tree | 06966bc8577ed5debd54253fbb7cef20fbeaabf1 /check | |
parent | 826a78924bbed1bfd0e17a869a11ccf3d320bb9b (diff) | |
download | subplot-bef7aa273eef984c0ea49ffa3df61989e47af18e.tar.gz |
fix: check for whether clippy is installed
Previously, "cargo --list" had "clippy" on its own line, with no
description. Now it has a description, so we need to change how we
look for clippy.
Sponsored-by: author
Diffstat (limited to 'check')
-rwxr-xr-x | check | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -107,7 +107,11 @@ class Runcmd: def got_cargo(self, subcommand): """Is a cargo subcommand available?""" p = self.runcmd(["cargo", "--list"], check=True, stdout=PIPE) - lines = [line.strip() for line in p.stdout.decode("UTF-8").splitlines()] + lines = [ + line.split()[0] + for line in p.stdout.decode("UTF-8").splitlines() + if line.strip() + ] return subcommand in lines def codegen(self, md, output, **kwargs): |