use tail to clear the first line of the template

pull/7679/head
Mitchell Hashimoto 2025-06-26 13:07:38 -07:00
parent 739b691a6d
commit 77654eb01c
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 6 additions and 1 deletions

View File

@ -321,8 +321,13 @@ fn addLinuxAppResources(
.GHOSTTY = exe_abs_path,
});
// Template output has a single header line we want to remove.
// We use `tail` to do it since its part of the POSIX standard.
const tail = b.addSystemCommand(&.{ "tail", "-n", "+2" });
tail.setStdIn(.{ .lazy_path = tpl.getOutput() });
const copy = b.addInstallFile(
tpl.getOutput(),
tail.captureStdOut(),
template[1],
);