Skip to content

Commit

Permalink
Fixes link self (#7558)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Sep 18, 2019
1 parent 53783b5 commit 1d90e07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util/normalize-manifest/resolve-relative.js
Expand Up @@ -44,7 +44,9 @@ export default function(info: Object, moduleLoc: string, lockfileFolder: string)
const absoluteTarget = path.resolve(lockfileFolder, moduleLoc, unprefixed);
let relativeTarget = path.relative(lockfileFolder, absoluteTarget) || '.';

if (hasPathPrefix) {
if (absoluteTarget === lockfileFolder) {
relativeTarget = '.';
} else if (hasPathPrefix) {
// TODO: This logic should be removed during the next major bump
// If the original value was using the "./" prefix, then we output a similar path.
// We need to do this because otherwise it would cause problems with already existing
Expand Down

0 comments on commit 1d90e07

Please sign in to comment.