Skip to content

Commit

Permalink
Merge 2ef39d8 into 82eb158
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Aug 28, 2024
2 parents 82eb158 + 2ef39d8 commit 1595a39
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tooling/nargo_cli/src/cli/fs/inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ pub(crate) fn read_inputs_from_file<P: AsRef<Path>>(

let file_path = path.as_ref().join(file_name).with_extension(format.ext());
if !file_path.exists() {
return Err(FilesystemError::MissingTomlFile(file_name.to_owned(), file_path));
if abi.parameters.is_empty() {
// Reading a return value from the `Prover.toml` is optional,
// so if the ABI has no parameters we can skip reading the file if it doesn't exist.
return Ok((BTreeMap::new(), None));
} else {
return Err(FilesystemError::MissingTomlFile(file_name.to_owned(), file_path));
}
}

let input_string = std::fs::read_to_string(file_path).unwrap();
Expand Down

0 comments on commit 1595a39

Please sign in to comment.