Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/install/PackageInstaller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2197,10 +2197,13 @@ impl<'a> PackageInstaller<'a> {
),
),
);
// Opt-in: ordinary failures; the dump would land in the install output.
#[cfg(bun_debug)]
{
let t = cause.debug_trace;
bun_crash_handler::dump_stack_trace(&t.trace(), Default::default());
if PackageInstaller.is_visible() {
bun_crash_handler::dump_stack_trace(
&cause.debug_trace.trace(),
Default::default(),
);
}
self.summary.fail += 1;
}
Expand Down
8 changes: 7 additions & 1 deletion test/cli/install/bun-link.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,13 @@ it("should link dependency without crashing", async () => {
env,
});
const err4 = await new Response(stderr4).text();
expect(err4).toContain(`FileNotFound: failed linking dependency/workspace to node_modules for package ${link_name}`);
// Debug builds used to follow this line with a stack trace (on stdout via
// llvm-symbolizer on Linux, on stderr elsewhere); neither stream may carry it
// unless BUN_DEBUG_PackageInstaller=1 is set.
Comment thread
robobun marked this conversation as resolved.
expect(err4.split(/\r?\n/)).toEqual([
`FileNotFound: failed linking dependency/workspace to node_modules for package ${link_name}`,
"",
]);
Comment thread
coderabbitai[bot] marked this conversation as resolved.
const out4 = await new Response(stdout4).text();
expect(out4.replace(/\[[0-9\.]+m?s\]/, "[]").split(/\r?\n/)).toEqual([
expect.stringContaining("bun install v1."),
Expand Down
Loading