Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Commit d4118f5

Browse files
committed
Avoid using b.findProgram() for code.
Workaround for #6.
1 parent 3ca93fd commit d4118f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

build.zig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ pub fn build(b: *std.Build) anyerror!void {
1212

1313
// TODO: https://github.com/ziglang/zig/issues/15373
1414
const pandoc_prog = b.findProgram(&.{"pandoc"}, &.{}) catch @panic("Could not locate `pandoc` program.");
15-
const code_prog = b.findProgram(&.{"code"}, &.{}) catch @panic("Could not locate `code` program.");
1615

1716
const install_step = b.getInstallStep();
1817
const check_step = b.step("check", "Run source code and documentation checks");
@@ -48,13 +47,13 @@ pub fn build(b: *std.Build) anyerror!void {
4847
}
4948

5049
const code_install_extension_step = b.addSystemCommand(
51-
&.{ code_prog, "--install-extension", b.pathJoin(&.{ "vscode", b.fmt("graf-{s}.vsix", .{version}) }) },
50+
&.{ "code", "--install-extension", b.pathJoin(&.{ "vscode", b.fmt("graf-{s}.vsix", .{version}) }) },
5251
);
5352
code_install_extension_step.step.dependOn(&npm_run_build_vscode.step);
5453

5554
install_vscode_step.dependOn(&code_install_extension_step.step);
5655

57-
const code_uninstall_extension_step = b.addSystemCommand(&.{ code_prog, "--uninstall-extension", "vezel.graf" });
56+
const code_uninstall_extension_step = b.addSystemCommand(&.{ "code", "--uninstall-extension", "vezel.graf" });
5857

5958
uninstall_vscode_step.dependOn(&code_uninstall_extension_step.step);
6059

0 commit comments

Comments
 (0)