Skip to content

Make output_limit in runCommand configurable or increase it #389

Description

@zendrx

Problem

The runCommand function in src/Package.zig has a hardcoded output_limit of 1 MB (1024 * 1024). If a build command produces more than 1 MB of stdout or stderr, it crashes with error.StreamTooLong.

Steps to Reproduce

  1. Run a build step that generates more than 1 MB of output
  2. The command fails with error.StreamTooLong

Expected Behavior

  • The limit should be configurable (e.g., via an environment variable like BUZZ_BUILD_OUTPUT_LIMIT)
  • Or the limit should be increased to a more reasonable default (e.g., 16 MB)

Link to Code

const output_limit = 1024 * 1024;

Suggested Fix

const output_limit = std.process.getEnvVar("BUZZ_BUILD_OUTPUT_LIMIT") catch "16777216";
const limit = try std.fmt.parseInt(usize, output_limit, 10);

Labels

  • good first issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions