diff options
| author | 2023-05-05 15:48:15 -0700 | |
|---|---|---|
| committer | 2023-05-05 15:48:26 -0700 | |
| commit | 9a09f9f532a6cad74fa0768f5c751e647c728def (patch) | |
| tree | 6037bc75173ed16bf54b45f4b88525b2cafdfd13 /src | |
| parent | 3a01316707970960a91da0e1793683bd7f169c3b (diff) | |
| download | bun-9a09f9f532a6cad74fa0768f5c751e647c728def.tar.gz bun-9a09f9f532a6cad74fa0768f5c751e647c728def.tar.zst bun-9a09f9f532a6cad74fa0768f5c751e647c728def.zip | |
Fix bug where the `Bun.file()` returned by `Bun.build()` would have an incorrect path
Diffstat (limited to 'src')
| -rw-r--r-- | src/bundler/bundle_v2.zig | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig index bf7e28d2c..81c26f488 100644 --- a/src/bundler/bundle_v2.zig +++ b/src/bundler/bundle_v2.zig @@ -1182,7 +1182,14 @@ pub const BundleV2 = struct { JSC.ZigString.static("result"), output_file.toJS( if (output_file.value == .saved) - bun.default_allocator.dupe(u8, output_file.input.text) catch unreachable + bun.default_allocator.dupe( + u8, + bun.path.joinAbsString( + this.config.dir.toOwnedSliceLeaky(), + &[_]string{ this.config.outdir.toOwnedSliceLeaky(), output_file.input.text }, + .auto, + ), + ) catch unreachable else "", globalThis, |
