Skip to content

Commit 6a66673

Browse files
committed
fix: chown /nix/store on macOS after mkdir
mkdir -p /nix/store inside sudo creates the directory as root. Use chown -R after mkdir so both /nix and /nix/store are user-owned.
1 parent 43981bb commit 6a66673

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,8 +957,8 @@ fn cmdInit(allocator: std.mem.Allocator, exec: bool) !void {
957957
\\ diskutil apfs addVolume disk3 APFS nix -mountpoint /nix
958958
\\ echo 'LABEL=nix /nix apfs rw' >> /etc/fstab
959959
\\fi
960-
\\chown {s} /nix
961960
\\mkdir -p /nix/store
961+
\\chown -R {s} /nix
962962
, .{user});
963963
defer allocator.free(script);
964964
var child = std.process.Child.init(

0 commit comments

Comments
 (0)