From cda7287ab98f373c69159ef129a37f4aabe6c14d Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 8 May 2024 11:54:13 -0700 Subject: [PATCH] use the correct script in pushworker --- src/CloudflareDeployStep.zig | 2 +- src/main.zig | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CloudflareDeployStep.zig b/src/CloudflareDeployStep.zig index cb4e147..b70c133 100644 --- a/src/CloudflareDeployStep.zig +++ b/src/CloudflareDeployStep.zig @@ -75,7 +75,7 @@ fn make(step: *std.Build.Step, prog_node: *std.Progress.Node) !void { &client, self.worker_name, self.options.wasm_dir orelse ".", - script, + final_script, al.writer(), std.io.getStdErr().writer(), ); diff --git a/src/main.zig b/src/main.zig index f3a5851..55996d3 100644 --- a/src/main.zig +++ b/src/main.zig @@ -162,7 +162,10 @@ fn loadWasm(allocator: std.mem.Allocator, script: []const u8, wasm_dir: []const errdefer allocator.free(nm); const path = try std.fs.path.join(allocator, &[_][]const u8{ wasm_dir, nm }); 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{ .allocator = allocator, .name = nm,