Skip to content

Commit 96ce223

Browse files
author
Elad Ben-Israel
authored
fix: symlinks don’t work on windows (#307)
When running on windows as a non-admin the symlink operation will fail. See hashicorp/terraform-cdk#501 for error. This just replaces the symlink with a copy.
2 parents cf00770 + 8402fe2 commit 96ce223

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export async function compile(workdir: string, options: Options) {
4343

4444
const targetdir = path.join(path.join(workdir, 'node_modules'), moduleName);
4545
await fs.mkdirp(path.dirname(targetdir));
46-
await fs.ensureSymlink(dir, targetdir);
46+
await fs.copy(dir, targetdir);
4747

4848
// add to "deps" and "peer deps"
4949
if (!moduleName.startsWith('@types/')) {

0 commit comments

Comments
 (0)