зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1484915 - Throw instead of keep going if cbindgen fails. r=boris
I think this should do. This still prints out stderr when it fails pointing to the solution, and doesn't fail the build. Differential Revision: https://phabricator.services.mozilla.com/D15784 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8115a1830e
Коммит
cc3bfeef51
|
@ -24,10 +24,10 @@ def generate(output, cbindgen_toml_path):
|
|||
], env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode == 0:
|
||||
output.write(stdout)
|
||||
else:
|
||||
print("cbindgen failed: %s" % stderr)
|
||||
if p.returncode != 0:
|
||||
raise TypeError("cbindgen failed: %s" % stderr)
|
||||
|
||||
output.write(stdout)
|
||||
|
||||
deps = set()
|
||||
deps.add(CARGO_LOCK)
|
||||
|
@ -35,4 +35,5 @@ def generate(output, cbindgen_toml_path):
|
|||
for file in files:
|
||||
if os.path.splitext(file)[1] == ".rs":
|
||||
deps.add(mozpath.join(path, file))
|
||||
|
||||
return deps
|
||||
|
|
Загрузка…
Ссылка в новой задаче