File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ struct Install {
105105 /// the directory the command is called.
106106 #[ arg( long) ]
107107 manifest : Option < PathBuf > ,
108+ /// Whether to bypass the install prompt.
109+ #[ clap( long) ]
110+ yes : bool ,
108111}
109112
110113#[ derive( Parser ) ]
@@ -121,6 +124,9 @@ struct Remove {
121124 /// the directory the command is called.
122125 #[ arg( long) ]
123126 manifest : Option < PathBuf > ,
127+ /// Whether to bypass the remove prompt.
128+ #[ clap( long) ]
129+ yes : bool ,
124130}
125131
126132#[ cfg( not( windows) ) ]
@@ -172,7 +178,7 @@ impl Install {
172178 php_ini = Some ( ini_path) ;
173179 }
174180
175- if !Confirm :: new ( )
181+ if !self . yes && ! Confirm :: new ( )
176182 . with_prompt ( format ! (
177183 "Are you sure you want to install the extension `{}`?" ,
178184 artifact. name
@@ -305,7 +311,7 @@ impl Remove {
305311 bail ! ( "Unable to find extension installed." ) ;
306312 }
307313
308- if !Confirm :: new ( )
314+ if !self . yes && ! Confirm :: new ( )
309315 . with_prompt ( format ! (
310316 "Are you sure you want to remove the extension `{}`?" ,
311317 artifact. name
You can’t perform that action at this time.
0 commit comments