build: fix race condition in build on creating 'share' dir

This commit is contained in:
Mitchell Hashimoto
2023-06-24 15:34:17 -07:00
parent 60d4024d64
commit 701cb9f2f5

View File

@ -324,6 +324,10 @@ pub fn build(b: *std.Build) !void {
run_step.addFileSourceArg(src_source); run_step.addFileSourceArg(src_source);
_ = run_step.captureStdErr(); // so we don't see stderr _ = run_step.captureStdErr(); // so we don't see stderr
// Depend on the terminfo source install step so that Zig build
// creates the "share" directory for us.
run_step.step.dependOn(&src_install.step);
{ {
const copy_step = RunStep.create(b, "copy terminfo db"); const copy_step = RunStep.create(b, "copy terminfo db");
copy_step.addArgs(&.{ "cp", "-R" }); copy_step.addArgs(&.{ "cp", "-R" });