@@ -75,15 +75,15 @@ pub fn main() !void {
75
75
});
76
76
defer build_root .deinit ();
77
77
78
- var global_cache_package_directory : std.fs.Dir = l : {
78
+ var global_cache : std.fs.Dir = l : {
79
79
const p = try std .fs .path .join (arena , &.{
80
80
override_global_cache_dir orelse try std .zig .introspect .resolveGlobalCacheDir (arena ),
81
81
"p" ,
82
82
});
83
83
84
84
break :l try std .fs .cwd ().makeOpenPath (p , .{});
85
85
};
86
- defer global_cache_package_directory .close ();
86
+ defer global_cache .close ();
87
87
88
88
var manifest , var ast = std .zig .loadManifest (gpa , arena , .{
89
89
.root_name = null ,
@@ -107,14 +107,14 @@ pub fn main() !void {
107
107
}
108
108
const dep : std.zig.Manifest.Dependency = dep : {
109
109
var dep = manifest .dependencies .get (package ) orelse {
110
- fatal ("there is no dependency named '{s}' in the manifest\n " , .{package });
110
+ fatal ("there is no dependency named '{s}' in the manifest" , .{package });
111
111
};
112
112
113
113
try dep_name .appendSlice (package );
114
114
115
115
for (subdeps .items ) | p | {
116
116
if (dep .hash ) | hash | {
117
- var package_dir = global_cache_package_directory .openDir (hash , .{}) catch | e | switch (e ) {
117
+ var package_dir = global_cache .openDir (hash , .{}) catch | e | switch (e ) {
118
118
error .FileNotFound = > fatal ("{s} is not in the global cache (hash: {s})" , .{
119
119
dep_name .items , hash ,
120
120
}),
@@ -136,10 +136,10 @@ pub fn main() !void {
136
136
try dep_name .append ('.' );
137
137
try dep_name .appendSlice (p );
138
138
} else switch (dep .location ) {
139
- .url = > fatal ("the hash for {s} is missing from the manifest.\n " , .{
139
+ .url = > fatal ("the hash for {s} is missing from the manifest." , .{
140
140
dep_name .items ,
141
141
}),
142
- .path = > | path | fatal ("{s} is a local dependency located at {s}\n " , .{
142
+ .path = > | path | fatal ("{s} is a local dependency located at {s}" , .{
143
143
dep_name .items , path ,
144
144
}),
145
145
}
@@ -152,7 +152,7 @@ pub fn main() !void {
152
152
153
153
if (dep .hash ) | hash | {
154
154
if (list ) {
155
- var package_dir = global_cache_package_directory .openDir (hash , .{}) catch | e | switch (e ) {
155
+ var package_dir = global_cache .openDir (hash , .{}) catch | e | switch (e ) {
156
156
error .FileNotFound = > fatal ("{s} is not in the global cache (hash: {s})" , .{
157
157
dep_name .items , hash ,
158
158
}),
@@ -198,8 +198,8 @@ pub fn main() !void {
198
198
try stdout .print ("{s}\n " , .{hash });
199
199
}
200
200
} else switch (dep .location ) {
201
- .url = > fatal ("the hash for {s} is missing from the manifest.\n " , .{package }),
202
- .path = > | path | fatal ("{s} is a local dependency located at {s}\n " , .{ package , path }),
201
+ .url = > fatal ("the hash for {s} is missing from the manifest." , .{package }),
202
+ .path = > | path | fatal ("{s} is a local dependency located at {s}" , .{ package , path }),
203
203
}
204
204
} else {
205
205
try listDepHashes ("" , manifest );
0 commit comments