Skip to content

Commit efad69f

Browse files
committed
fix: fix pipeline
1 parent 0d83b98 commit efad69f

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

lib/external-resources/resource.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,18 @@ export default class ExternalResource extends Events {
151151
await this.#createResourceDir();
152152

153153
// unpack
154-
res = await stream.promises
155-
.pipeline(
156-
stream.Readable.fromWeb( res.body ),
157-
tar.extract( {
158-
"cwd": this.#location,
159-
} )
160-
)
161-
.then( () => result( 200 ) )
162-
.catch( e => result.catch( e ) );
154+
await stream.promises.pipeline(
155+
stream.Readable.fromWeb( res.body ),
156+
tar.extract( {
157+
"cwd": this.#location,
158+
} )
159+
);
160+
161+
res = result( 200 );
162+
}
163+
catch ( e ) {
164+
res = result.catch( e, { "log": false } );
163165
}
164-
catch {}
165166

166167
// update failed
167168
if ( !res.ok ) {

0 commit comments

Comments
 (0)