Skip to content

Commit

Permalink
silently fail open
Browse files Browse the repository at this point in the history
  • Loading branch information
18alantom committed Jun 11, 2024
1 parent 5d03130 commit e17853f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/os.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const process = std.process;

pub fn open(path: []const u8) !void {
switch (builtin.os.tag) {
.macos => try openMacOs(path),
.linux => try openLinux(path),
.macos => openMacOs(path) catch {},
.linux => openLinux(path) catch {},
else => return,
}
}
Expand All @@ -17,7 +17,7 @@ fn openMacOs(path: []const u8) !void {

fn openLinux(path: []const u8) !void {
var argv = [_][]const u8{ "xdg-open", path };
_ = try run(&argv);
try run(&argv);
}

pub fn run(argv: [][]const u8) !void {
Expand Down

0 comments on commit e17853f

Please sign in to comment.