mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
fix(cli/install): --silent disables summary (#16321)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com> Co-authored-by: Michael H <git@riskymh.dev>
This commit is contained in:
@@ -7567,7 +7567,7 @@ pub const PackageManager = struct {
|
||||
this.do.save_lockfile = false;
|
||||
}
|
||||
|
||||
if (cli.no_summary) {
|
||||
if (cli.no_summary or cli.silent) {
|
||||
this.do.summary = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1970,6 +1970,25 @@ test("--lockfile-only", async () => {
|
||||
expect((await Bun.file(join(packageDir, "bun.lock")).text()).replaceAll(/localhost:\d+/g, "localhost:1234")).toBe(
|
||||
firstLockfile,
|
||||
);
|
||||
|
||||
// --silent works
|
||||
const {
|
||||
stdout,
|
||||
stderr,
|
||||
exited: exited2,
|
||||
} = spawn({
|
||||
cmd: [bunExe(), "install", "--lockfile-only", "--silent"],
|
||||
cwd: packageDir,
|
||||
stdout: "pipe",
|
||||
stderr: "pipe",
|
||||
env,
|
||||
});
|
||||
|
||||
expect(await exited2).toBe(0);
|
||||
const out = await Bun.readableStreamToText(stdout);
|
||||
const err = await Bun.readableStreamToText(stderr);
|
||||
expect(out).toBe("");
|
||||
expect(err).toBe("");
|
||||
});
|
||||
|
||||
describe("bundledDependencies", () => {
|
||||
|
||||
Reference in New Issue
Block a user