Skip to content

Commit 5094f3b

Browse files
authored
fix: rename shadowed pkg_version constant in install (#100)
* fix: rename shadowed variable to fix compilation error * fix: rename shadowed pkg_version constant in dependency loop
1 parent da0d8f1 commit 5094f3b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/cmd/install.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ pub fn installCmd(allocator: Allocator, args: []const []const u8, config: Config
233233
const dep_version = idx.getString(dep_entry.version_offset);
234234
const dep_revision = dep_entry.revision;
235235

236-
// Build pkg_version: "version" or "version_revision"
236+
// Build dep_pkg_version: "version" or "version_revision"
237237
var dep_ver_buf: [256]u8 = undefined;
238-
const pkg_version = if (dep_revision > 0)
238+
const dep_pkg_version = if (dep_revision > 0)
239239
std.fmt.bufPrint(&dep_ver_buf, "{s}_{d}", .{ dep_version, dep_revision }) catch continue
240240
else
241241
dep_version;
@@ -246,7 +246,7 @@ pub fn installCmd(allocator: Allocator, args: []const []const u8, config: Config
246246
const version_str = try allocator.dupe(u8, dep_version);
247247
errdefer allocator.free(version_str);
248248

249-
const pkg_ver = try allocator.dupe(u8, pkg_version);
249+
const pkg_ver = try allocator.dupe(u8, dep_pkg_version);
250250

251251
runtime_deps.appendAssumeCapacity(.{
252252
.full_name = full_name,

0 commit comments

Comments
 (0)