File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -108,14 +108,26 @@ async fn main() -> anyhow::Result<()> {
108
108
if args. archived {
109
109
let ( tx, mut rx) = mpsc:: channel ( 1 ) ;
110
110
111
- tokio:: spawn ( async move {
112
- stdin:: streaming (
113
- tx,
114
- Duration :: from_millis ( args. retrieval_timeout_millis ) ,
115
- CancellationToken :: new ( ) ,
116
- )
117
- . await
118
- } ) ;
111
+ if let Some ( cmd) = args. cmd . clone ( ) {
112
+ tokio:: spawn ( async move {
113
+ cmd:: execute (
114
+ & cmd,
115
+ tx,
116
+ Duration :: from_millis ( args. retrieval_timeout_millis ) ,
117
+ CancellationToken :: new ( ) ,
118
+ )
119
+ . await
120
+ } ) ;
121
+ } else {
122
+ tokio:: spawn ( async move {
123
+ stdin:: streaming (
124
+ tx,
125
+ Duration :: from_millis ( args. retrieval_timeout_millis ) ,
126
+ CancellationToken :: new ( ) ,
127
+ )
128
+ . await
129
+ } ) ;
130
+ }
119
131
120
132
let mut queue = VecDeque :: with_capacity ( args. queue_capacity ) ;
121
133
loop {
You can’t perform that action at this time.
0 commit comments