Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows compilation #26

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/gossip/cmd.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const IDENTITY_KEYPAIR_DIR = "/.sig";
const IDENTITY_KEYPAIR_PATH = "/identity.key";

pub fn getOrInitIdentity(allocator: std.mem.Allocator, logger: *Logger) !Keypair {
const home_dir = std.os.getenv("HOME") orelse return error.UnableDetectHomeDir;
const home_dir = try std.process.getEnvVarOwned(allocator, "HOME");
defer allocator.free(home_dir);
var path = try std.mem.concat(allocator, u8, &[_][]const u8{ home_dir, IDENTITY_KEYPAIR_DIR, IDENTITY_KEYPAIR_PATH });

if (std.fs.openFileAbsolute(path, .{})) |file| {
Expand Down
1 change: 1 addition & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const cmd = @import("cmd/cmd.zig");
const std = @import("std");
sarahkittyy marked this conversation as resolved.
Show resolved Hide resolved

pub fn main() !void {
try cmd.run();
Expand Down
Loading