File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,13 @@ export async function loading<Promised extends Promise<any>>(
2929 }
3030
3131 async function spin ( ) {
32- await write ( cursorHide ( ) ) ;
32+ await write ( cursorHide ( ) , Deno . stderr ) ;
3333
3434 while ( spinning ) {
35- await writeLn ( frames [ i ++ % frames . length ] + " " + text ) ;
35+ await writeLn ( frames [ i ++ % frames . length ] + " " + text , Deno . stderr ) ;
3636 await new Promise < void > ( ( resolve ) =>
3737 setTimeout ( async ( ) => {
38- await write ( cursorUp ( 1 ) + eraseDown ( ) ) ;
38+ await write ( cursorUp ( 1 ) + eraseDown ( ) , Deno . stderr ) ;
3939 resolve ( ) ;
4040 } , 100 )
4141 ) ;
@@ -47,13 +47,13 @@ export async function loading<Promised extends Promise<any>>(
4747 spinning = false ;
4848 return value ;
4949 } ) . catch ( async ( error ) => {
50- await write ( cursorUp ( 1 ) + eraseDown ( ) + cursorShow ( ) ) ;
50+ await write ( cursorUp ( 1 ) + eraseDown ( ) + cursorShow ( ) , Deno . stderr ) ;
5151 throw error ;
5252 } ) ,
5353 spin ( ) ,
5454 ] ) ;
5555
56- await write ( cursorShow ( ) ) ;
56+ await write ( cursorShow ( ) , Deno . stderr ) ;
5757 return value ;
5858}
5959
You can’t perform that action at this time.
0 commit comments