File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11import fs from 'fs/promises' ;
22import pathlib from 'path' ;
3+ import utils from 'util' ;
34import * as core from '@actions/core' ;
45import { getExecOutput } from '@actions/exec' ;
56
@@ -98,7 +99,17 @@ async function findPackages(directory: string, maxDepth?: number) {
9899 if ( item . name === 'package.json' ) {
99100 try {
100101 return await getPackageInfo ( currentDir ) ;
101- } catch { }
102+ } catch ( error ) {
103+ if ( ! utils . types . isNativeError ( error ) ) {
104+ core . error ( `Unknown error occurred ${ error } ` ) ;
105+ throw error ;
106+ }
107+
108+ if ( 'code' in error && error . code !== 'ERR_MODULE_NOT_FOUND' ) {
109+ core . error ( error ) ;
110+ throw error ;
111+ }
112+ }
102113 }
103114 continue ;
104115 }
@@ -118,7 +129,6 @@ async function findPackages(directory: string, maxDepth?: number) {
118129}
119130
120131async function runForAllPackages ( gitRoot : string ) {
121-
122132 const results = await Promise . all (
123133 Object . entries ( {
124134 libs : pathlib . join ( gitRoot , 'lib' ) ,
You can’t perform that action at this time.
0 commit comments