Skip to content

Commit

Permalink
alter symlink creation to allow for windows file permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
citkane committed Aug 24, 2022
1 parent 66abff2 commit ebc7cf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/etc/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function makeStableLink(
stableSource = path.join(docRoot, stableSource);
const stableTarget = path.join(docRoot, name);
fs.existsSync(stableTarget) && fs.unlinkSync(stableTarget);
fs.createSymlinkSync(stableSource, stableTarget, 'dir');
fs.ensureSymlinkSync(stableSource, stableTarget, 'junction');
}

/**
Expand All @@ -183,7 +183,7 @@ export function makeDevLink(
throw new Error(`Document directory does not exist: ${pegVersion}`);
const devTarget = path.join(docRoot, name);
fs.existsSync(devTarget) && fs.unlinkSync(devTarget);
fs.createSymlinkSync(devSource, devTarget, 'dir');
fs.ensureSymlinkSync(devSource, devTarget, 'junction');
}

/**
Expand All @@ -198,7 +198,7 @@ export function makeMinorVersionLinks(semGroups, docRoot): void {
const target = path.join(docRoot, `${major}.${minor}`);
const src = path.join(docRoot, `${major}.${minor}.${patch}`);
fs.existsSync(target) && fs.unlinkSync(target);
fs.createSymlinkSync(src, target, 'dir');
fs.ensureSymlinkSync(src, target, 'junction');
});
});
}
Expand Down

0 comments on commit ebc7cf1

Please sign in to comment.