Skip to content

Commit 246486b

Browse files
committed
introduce the 'zig fetch' command + symlink support
zig fetch [options] <url> zig fetch [options] <path> Fetches a package which is found at <url> or <path> into the global cache directory, printing the package hash to stdout. Closes #16972 Related to #14280 Additionally, this commit: * Adds uncompressed .tar support to package fetching * Introduces symlink support to package fetching
1 parent 7e998d2 commit 246486b

File tree

4 files changed

+302
-107
lines changed

4 files changed

+302
-107
lines changed

lib/std/tar.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ pub fn pipeToFileSystem(dir: std.fs.Dir, reader: anytype, options: Options) !voi
210210
while (true) {
211211
const temp = try buffer.readChunk(reader, @intCast(rounded_file_size + 512 - file_off));
212212
if (temp.len == 0) return error.UnexpectedEndOfStream;
213-
const slice = temp[0..@as(usize, @intCast(@min(file_size - file_off, temp.len)))];
213+
const slice = temp[0..@intCast(@min(file_size - file_off, temp.len))];
214214
try file.writeAll(slice);
215215

216216
file_off += slice.len;

0 commit comments

Comments
 (0)