summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rwxr-xr-xcheck6
1 files changed, 5 insertions, 1 deletions
diff --git a/check b/check
index ac19c5f..cb5ffc1 100755
--- a/check
+++ b/check
@@ -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):