Skip to content

Commit

Permalink
fix: add message if hjson is not found and mention hjson in README.md
Browse files Browse the repository at this point in the history
closes #1
  • Loading branch information
neurocyte committed Aug 5, 2024
1 parent 4e83920 commit b53d024
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# flow-themes
Themes compiler for Flow-Control, the text editor

## Requirements

- zig 0.13
- hjson (installed in your PATH)

## Build

`zig build`

This will download and compile all the themes and create a zig module
in `zig-out` that can be referenced as a dependency from another project's
`build.zig.zon`.
2 changes: 1 addition & 1 deletion src/compile.zig
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ fn hjson(data: []const u8) ![]const u8 {
if (bytesRead == 0) break;
try writer.writeAll(buffer[0..bytesRead]);
}
const term = try child.wait();
const term = child.wait() catch |e| std.debug.panic("error running hjson: {any}", .{e});
switch (term) {
std.process.Child.Term.Exited => |code| if (code == 0) return out.toOwnedSlice(),
else => {},
Expand Down

0 comments on commit b53d024

Please sign in to comment.