Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-TTY handling for proof inputs #92

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all 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
5 changes: 3 additions & 2 deletions src/cli/proof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const proofCreateCommand = new Command()
.description("Create a proof for the circuit.")
.option(
"-i, --input <input>",
"Input file for the proof (defaults to stdin in on-TTY; " +
"Input file for the proof (defaults to stdin if non-TTY; " +
"`input.json`, `example-input.json`, or `Prover.toml` otherwise).",
)
.option("-t, --tag <tag>", "Tag to generate the proof from.", "latest")
Expand Down Expand Up @@ -92,7 +92,8 @@ const proofCreateCommand = new Command()
} else if (!process.stdin.isTTY || input === "-") {
// Read from stdin in a non-TTY context.
proofInput = await readStdin();
} else {
}
if (!proofInput || !proofInput.trim()) {
// Try to load from common input filenames.
const defaultInputFiles = [
"input.json",
Expand Down