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

respect silent argument in script command #4160

Conversation

i-m-aditya
Copy link
Contributor

Motivation

Respect --silent argument in forge script command

Solution

Fixes #4009

@i-m-aditya i-m-aditya force-pushed the i-m-aditya/respect-silent-argument-in-script-command branch from 03779e3 to e1ffba8 Compare January 24, 2023 06:33
@i-m-aditya i-m-aditya force-pushed the i-m-aditya/respect-silent-argument-in-script-command branch from e1ffba8 to d69efd2 Compare January 24, 2023 06:44
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the command is still using regular println!, right?

we'd need to refactor them as well and go trough shell

@i-m-aditya i-m-aditya force-pushed the i-m-aditya/respect-silent-argument-in-script-command branch 4 times, most recently from 842650b to 67835b1 Compare January 26, 2023 13:28
@i-m-aditya i-m-aditya force-pushed the i-m-aditya/respect-silent-argument-in-script-command branch from 67835b1 to 755fed5 Compare January 26, 2023 13:29
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nits, otherwise lgtm


println!("\nTransactions saved to: {path}\n");
shell::println(format!("\nTransactionsdffs saved to: {path}\n"))?;
// println!("\nTransactions saved to: {path}\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// println!("\nTransactions saved to: {path}\n");

Comment on lines 33 to 34
if self.opts.args.silent {
shell::set_shell(shell::Shell::from_args(true, false))?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be combined by using self.opts.args.silent as argument

@mattsse mattsse added the Cmd-forge-script Command: forge script label Jan 26, 2023
@mattsse
Copy link
Member

mattsse commented Jan 27, 2023

the failing script tests indicate that something's not behaving as expected

@i-m-aditya i-m-aditya force-pushed the i-m-aditya/respect-silent-argument-in-script-command branch from c5f80b3 to 09b46eb Compare January 28, 2023 06:50
@mattsse mattsse merged commit 5c2db0b into foundry-rs:master Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmd-forge-script Command: forge script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Respect --silent argument in script command
2 participants