Skip to content

Commit c4616df

Browse files
committed
fixup! refactor(@angular/build): export NormalizedAssetsPattern and avoid mutating input patterns
1 parent 792654f commit c4616df

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/angular/build/src/utils/normalize-asset-patterns.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ export function normalizeAssetPatterns(
6565
throw new Error(`The ${assetPattern} asset path must be within the workspace root.`);
6666
}
6767

68-
const isDirectory =
69-
statSync(resolvedAssetPath, { throwIfNoEntry: false })?.isDirectory() ?? true;
68+
let isDirectory = true;
69+
try {
70+
isDirectory = statSync(resolvedAssetPath, { throwIfNoEntry: false })?.isDirectory() ?? true;
71+
} catch {}
7072
const glob = isDirectory ? '**/*' : path.basename(assetPath);
7173
const input = isDirectory ? assetPath : path.dirname(assetPath);
7274

0 commit comments

Comments
 (0)