mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 21:01:52 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -165,6 +165,7 @@ bun run --filter 'ba*' <script>
|
||||
will execute `<script>` in both `bar` and `baz`, but not in `foo`.
|
||||
|
||||
When using `--filter`, you can control the output display with:
|
||||
|
||||
- `--elide-lines <number>`: Limit the number of output lines shown per package (default: 10, use 0 for no limit)
|
||||
- `--stream`: Stream output immediately without buffering or formatting (similar to pnpm's `--stream`)
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ pub fn parse(allocator: std.mem.Allocator, ctx: Command.Context, comptime cmd: C
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ctx.bundler_options.stream_logs = args.flag("--stream");
|
||||
}
|
||||
|
||||
@@ -1144,7 +1144,7 @@ pub fn parse(allocator: std.mem.Allocator, ctx: Command.Context, comptime cmd: C
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ctx.bundler_options.stream_logs = args.flag("--stream");
|
||||
|
||||
if (opts.define) |define| {
|
||||
|
||||
@@ -560,12 +560,12 @@ pub fn runScriptsWithFilter(ctx: Command.Context) !noreturn {
|
||||
Output.prettyErrorln("<r><red>error<r>: --stream and --elide-lines cannot be used together", .{});
|
||||
Global.exit(1);
|
||||
}
|
||||
|
||||
|
||||
// When --stream is set, disable pretty output
|
||||
if (state.stream_logs) {
|
||||
state.pretty_output = false;
|
||||
}
|
||||
|
||||
|
||||
// Check if elide-lines is used in a non-terminal environment
|
||||
if (ctx.bundler_options.elide_lines != null and !state.pretty_output) {
|
||||
Output.prettyErrorln("<r><red>error<r>: --elide-lines is only supported in terminal environments", .{});
|
||||
|
||||
Reference in New Issue
Block a user