Use build.run instead of build.exec

This commit is contained in:
2023-12-22 20:38:25 +01:00
parent b9c6fcb8ca
commit 4a91d9dc7d

View File

@@ -84,11 +84,11 @@ pub const Scanner = struct {
pub fn create(b: *Build, options: Options) *Scanner { pub fn create(b: *Build, options: Options) *Scanner {
const wayland_xml_path = options.wayland_xml_path orelse blk: { const wayland_xml_path = options.wayland_xml_path orelse blk: {
const pc_output = b.exec(&.{ "pkg-config", "--variable=pkgdatadir", "wayland-scanner" }); const pc_output = b.run(&.{ "pkg-config", "--variable=pkgdatadir", "wayland-scanner" });
break :blk b.pathJoin(&.{ mem.trim(u8, pc_output, &std.ascii.whitespace), "wayland.xml" }); break :blk b.pathJoin(&.{ mem.trim(u8, pc_output, &std.ascii.whitespace), "wayland.xml" });
}; };
const wayland_protocols_path = options.wayland_protocols_path orelse blk: { const wayland_protocols_path = options.wayland_protocols_path orelse blk: {
const pc_output = b.exec(&.{ "pkg-config", "--variable=pkgdatadir", "wayland-protocols" }); const pc_output = b.run(&.{ "pkg-config", "--variable=pkgdatadir", "wayland-protocols" });
break :blk mem.trim(u8, pc_output, &std.ascii.whitespace); break :blk mem.trim(u8, pc_output, &std.ascii.whitespace);
}; };