use the correct script in pushworker

This commit is contained in:
Emil Lerch 2024-05-08 11:54:13 -07:00
parent e8b0ff50fe
commit cda7287ab9
Signed by: lobo
GPG Key ID: A7B62D657EF764F8
2 changed files with 5 additions and 2 deletions

View File

@ -75,7 +75,7 @@ fn make(step: *std.Build.Step, prog_node: *std.Progress.Node) !void {
&client, &client,
self.worker_name, self.worker_name,
self.options.wasm_dir orelse ".", self.options.wasm_dir orelse ".",
script, final_script,
al.writer(), al.writer(),
std.io.getStdErr().writer(), std.io.getStdErr().writer(),
); );

View File

@ -162,7 +162,10 @@ fn loadWasm(allocator: std.mem.Allocator, script: []const u8, wasm_dir: []const
errdefer allocator.free(nm); errdefer allocator.free(nm);
const path = try std.fs.path.join(allocator, &[_][]const u8{ wasm_dir, nm }); const path = try std.fs.path.join(allocator, &[_][]const u8{ wasm_dir, nm });
defer allocator.free(path); defer allocator.free(path);
const data = try std.fs.cwd().readFileAlloc(allocator, path, std.math.maxInt(usize)); const data = std.fs.cwd().readFileAlloc(allocator, path, std.math.maxInt(usize)) catch |e| {
std.log.err("Could not read {s}: {}", .{ path, e });
return e;
};
return Wasm{ return Wasm{
.allocator = allocator, .allocator = allocator,
.name = nm, .name = nm,