File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -165,12 +165,19 @@ pub fn init_writer(stored_static: &StoredStatic) -> AfterfactWriter {
165165
166166 let mut display_flag = false ;
167167 let target: Box < dyn io:: Write > = if let Some ( path) = & stored_static. output_path {
168- // output to file
169- match File :: create ( path) {
170- Ok ( file) => Box :: new ( BufWriter :: new ( file) ) ,
171- Err ( err) => {
172- AlertMessage :: alert ( & format ! ( "Failed to open file. {err}" ) ) . ok ( ) ;
173- process:: exit ( 1 ) ;
168+ if matches ! (
169+ stored_static. config. action. as_ref( ) . unwrap( ) ,
170+ Action :: PivotKeywordsList ( _) | Action :: LogonSummary ( _)
171+ ) {
172+ Box :: new ( BufWriter :: new ( io:: stdout ( ) ) )
173+ } else {
174+ // output to file
175+ match File :: create ( path) {
176+ Ok ( file) => Box :: new ( BufWriter :: new ( file) ) ,
177+ Err ( err) => {
178+ AlertMessage :: alert ( & format ! ( "Failed to open file. {err}" ) ) . ok ( ) ;
179+ process:: exit ( 1 ) ;
180+ }
174181 }
175182 }
176183 } else {
You can’t perform that action at this time.
0 commit comments