File tree Expand file tree Collapse file tree 1 file changed +11
-23
lines changed Expand file tree Collapse file tree 1 file changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -8,30 +8,18 @@ import {MessageError} from '../errors.js';
8
8
9
9
export default class CopyFetcher extends BaseFetcher {
10
10
async _fetch ( ) : Promise < FetchedOverride > {
11
- try {
12
- const { files} = await this . config . readManifest ( this . reference , this . registry ) ;
13
- if ( files ) {
14
- await Promise . all (
15
- [ 'package.json' ] . concat ( files ) . map ( fileName => {
16
- const source = path . join ( this . reference , fileName ) ;
17
- const destination = path . join ( this . dest , fileName ) ;
18
- return fs . copy ( source , destination , this . reporter ) ;
19
- } ) ,
20
- ) ;
21
-
22
- return {
23
- hash : this . hash || '' ,
24
- resolved : null ,
25
- } ;
26
- }
27
- } catch ( err ) {
28
- if ( err instanceof MessageError ) {
29
- this . reporter . warn ( err ) ;
30
- } else {
31
- throw err ;
32
- }
11
+ const { files} = await this . config . readManifest ( this . reference , this . registry ) ;
12
+ if ( files ) {
13
+ await Promise . all (
14
+ [ 'package.json' ] . concat ( files ) . map ( fileName => {
15
+ const source = path . join ( this . reference , fileName ) ;
16
+ const destination = path . join ( this . dest , fileName ) ;
17
+ return fs . copy ( source , destination , this . reporter ) ;
18
+ } ) ,
19
+ ) ;
20
+ } else {
21
+ await fs . copy ( this . reference , this . dest , this . reporter ) ;
33
22
}
34
- await fs . copy ( this . reference , this . dest , this . reporter ) ;
35
23
return {
36
24
hash : this . hash || '' ,
37
25
resolved : null ,
You can’t perform that action at this time.
0 commit comments