Skip to content

Commit

Permalink
fix(core): pass the relativePath to shouldExclude
Browse files Browse the repository at this point in the history
  • Loading branch information
blaenk committed Oct 7, 2020
1 parent c2e0b5d commit 55cf1cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@aws-cdk/core/lib/fs/fingerprint.ts
Expand Up @@ -39,12 +39,13 @@ export function fingerprint(fileOrDirectory: string, options: FingerprintOptions
return hash.digest('hex');

function _processFileOrDirectory(symbolicPath: string, isRootDir: boolean = false, realPath = symbolicPath) {
if (!isRootDir && shouldExclude(exclude, symbolicPath)) {
const relativePath = path.relative(fileOrDirectory, symbolicPath);

if (!isRootDir && shouldExclude(exclude, relativePath)) {
return;
}

const stat = fs.lstatSync(realPath);
const relativePath = path.relative(fileOrDirectory, symbolicPath);

if (stat.isSymbolicLink()) {
const linkTarget = fs.readlinkSync(realPath);
Expand Down

0 comments on commit 55cf1cc

Please sign in to comment.