@@ -31,6 +31,9 @@ struct Cmd {
3131 /// Offline mode
3232 #[ interactive_clap( long) ]
3333 offline : bool ,
34+ /// Quiet mode
35+ #[ interactive_clap( long) ]
36+ quiet : bool ,
3437 /// TEACH-ME mode
3538 #[ interactive_clap( long) ]
3639 teach_me : bool ,
@@ -49,6 +52,7 @@ impl CmdContext {
4952 Ok ( Self ( crate :: GlobalContext {
5053 config : previous_context. 0 ,
5154 offline : scope. offline ,
55+ quiet : scope. quiet ,
5256 teach_me : scope. teach_me ,
5357 } ) )
5458 }
@@ -123,10 +127,12 @@ fn main() -> crate::common::CliResult {
123127 std:: iter:: once ( & near_cli_exec_path) . chain ( & cli_cmd. to_cli_args ( ) ) ,
124128 ) ;
125129
126- eprintln ! (
127- "\n \n Here is your console command if you need to script it or re-run:\n {}\n " ,
128- cli_cmd_str. yellow( )
129- ) ;
130+ if !cli_cmd. quiet {
131+ eprintln ! (
132+ "\n \n Here is your console command if you need to script it or re-run:\n {}\n " ,
133+ cli_cmd_str. yellow( )
134+ ) ;
135+ }
130136
131137 crate :: common:: save_cli_command ( & cli_cmd_str) ;
132138
@@ -145,10 +151,12 @@ fn main() -> crate::common::CliResult {
145151 std:: iter:: once ( & near_cli_exec_path) . chain ( & cli_cmd. to_cli_args ( ) ) ,
146152 ) ;
147153
148- eprintln ! (
149- "\n Here is your console command if you need to script it or re-run:\n {}\n " ,
150- cli_cmd_str. yellow( )
151- ) ;
154+ if !cli_cmd. quiet {
155+ eprintln ! (
156+ "\n Here is your console command if you need to script it or re-run:\n {}\n " ,
157+ cli_cmd_str. yellow( )
158+ ) ;
159+ }
152160
153161 crate :: common:: save_cli_command ( & cli_cmd_str) ;
154162 }
@@ -186,6 +194,7 @@ fn main() -> crate::common::CliResult {
186194 ) ;
187195 let self_update_cli_cmd = CliCmd {
188196 offline : false ,
197+ quiet : false ,
189198 teach_me : false ,
190199 top_level :
191200 Some ( crate :: commands:: CliTopLevelCommand :: Extensions (
0 commit comments