tools: Distingush empty or failed runs of godoc.

- godoc doesn't always have good results.
This commit is contained in:
Andrew Hamilton 2021-05-31 22:12:07 +10:00
parent 7ef9cf02d1
commit 2bc735dff4

View file

@ -476,7 +476,9 @@ def godoc(path):
os.symlink(os.path.abspath(path), symlink_path)
stdout, stderr, returncode = _do_command(["go", "doc", "."], cwd=temp_dir)
os.remove(symlink_path)
return Status.normal, stdout
status = (Status.not_applicable if stdout.strip() == "" or returncode != 0
else Status.normal)
return status, stdout + stderr
@deps(deps={"git"}, url="https://git-scm.com/docs/git-log",