fix: branch widget: don't call git status if there is no git workspace

This commit is contained in:
CJ van den Berg 2025-08-04 09:47:24 +02:00
parent 5724739b51
commit 410a6aadce
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -66,8 +66,8 @@ fn on_click(self: *Self, _: *Button.State(Self)) void {
command.executeName("show_git_status", .{}) catch {};
}
fn refresh_git_status(_: *Self) void {
git.status(0) catch {};
fn refresh_git_status(self: *Self) void {
if (self.workspace_path) |_| git.status(0) catch {};
}
pub fn receive(self: *Self, _: *Button.State(Self), _: tp.pid_ref, m: tp.message) error{Exit}!bool {