Skip to content

forge verify-contract --show-standard-input-json logs errors and warnings to standard output #13034

@scnale

Description

@scnale

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.5.1-stable Commit SHA: b0a9dd9 Build Timestamp: 2025-12-22T11:39:01.425730780Z (1766403541) Build Profile: maxperf

What version of Foundryup are you on?

foundryup: 1.5.0

What command(s) is the bug in?

forge verify-contract

Operating System

Linux

Describe the bug

When you don't have a cache directory in your foundry project and run:

forge verify-contract --show-standard-input-json 0x0000000000000000000000000000000000000000 <your-contract> > input.json

You'll see something like this in the first line of input.json:

�[2m2026-01-09T14:03:54.003279Z�[0m �[31mERROR�[0m �[2mfoundry_compilers::cache�[0m�[2m:�[0m �[3merror�[0m�[2m=�[0m"/app/cache/solidity-files-cache.json": No such file or directory (os error 2)

While the second line will contain the expected JSON.

Running this instead:

forge verify-contract --show-standard-input-json 0x0000000000000000000000000000000000000000 <your-contract> 2>/dev/null > input.json

doesn't help either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bugType: bugT-needs-triageType: this issue needs to be labelled

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions