check if failed

This commit is contained in:
thesayyn 2023-11-09 08:56:30 -08:00
parent 0b9793d2ff
commit b7e0bfe109
No known key found for this signature in database
GPG Key ID: D10C0AE203D0E4A8
1 changed files with 3 additions and 1 deletions

View File

@ -102,7 +102,9 @@ package(default_visibility = ["//visibility:public"])
sha256 = remote[1],
)
rctx.file("extract.sh", executable = True, content = NAR_EXTRACT)
rctx.execute([rctx.path("extract.sh"), "bsdtar.nar.xz", "+%s" % (remote[2][0] + 1), "%s" % remote[2][1], tar_name])
r = rctx.execute([rctx.path("extract.sh"), "bsdtar.nar.xz", "+%s" % (remote[2][0] + 1), "%s" % remote[2][1], tar_name])
if r.return_code != 0:
fail("bsdtar extraction failed.\nstderr: \n{}\nstdout:\n{}".format(r.stderr, r.stdout))
rctx.file("BUILD.bazel", build_header + """tar_toolchain(name = "bsdtar_toolchain", binary = "{}")""".format(tar_name))