Skip to content

Commit

Permalink
correctly ignore error on windows to match posix behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
gvilums committed Apr 11, 2024
1 parent edeb75a commit 2379b05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/create_command.zig
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ pub const CreateCommand = struct {
var parent_dir = try std.fs.openDirAbsolute(destination, .{});
defer parent_dir.close();
if (comptime Environment.isWindows) {
try parent_dir.copyFile("gitignore", parent_dir, ".gitignore", .{});
parent_dir.copyFile("gitignore", parent_dir, ".gitignore", .{}) catch {};
} else {
std.os.linkat(parent_dir.fd, "gitignore", parent_dir.fd, ".gitignore", 0) catch {};
}
Expand Down

0 comments on commit 2379b05

Please sign in to comment.