Skip to content
Merged
Changes from 2 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
6 changes: 6 additions & 0 deletions cli/src/cmd/forge/script/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ pub struct ScriptArgs {
#[clap(long)]
pub slow: bool,

/// Disables interactive prompts that might appear when deploying big contracts.
Comment thread
Evalir marked this conversation as resolved.
#[clap(long)]
pub non_interactive: bool,

/// The Etherscan (or equivalent) API key
#[clap(long, env = "ETHERSCAN_API_KEY", value_name = "KEY")]
pub etherscan_api_key: Option<String>,
Expand Down Expand Up @@ -624,7 +628,9 @@ impl ScriptArgs {
}
}

// Only prompt if we're broadcasting and we've not disabled interactivity.
if prompt_user &&
!self.non_interactive &&
!Confirm::new().with_prompt("Do you wish to continue?".to_string()).interact()?
{
eyre::bail!("User canceled the script.");
Expand Down