From 3998cc7f8b89cb28a71dc0fae245f2104ec0146e Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Fri, 14 Jun 2024 20:45:52 +0200 Subject: [PATCH] Fix for the linking script on windows OS --- scripts/link-in-app.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/link-in-app.ts b/scripts/link-in-app.ts index c7e1d5f6..c50bbdbe 100644 --- a/scripts/link-in-app.ts +++ b/scripts/link-in-app.ts @@ -2,6 +2,7 @@ import { execSync } from "child_process"; import { join as pathJoin, relative as pathRelative } from "path"; import { getThisCodebaseRootDirPath } from "../src/bin/tools/getThisCodebaseRootDirPath"; import * as fs from "fs"; +import * as os from "os"; const singletonDependencies: string[] = ["react", "@types/react"]; @@ -83,7 +84,9 @@ const execYarnLink = (params: { targetModuleName?: string; cwd: string }) => { cwd, env: { ...process.env, - HOME: yarnGlobalDirPath + ...(os.platform() === "win32" + ? { USERPROFILE: yarnGlobalDirPath } + : { HOME: yarnGlobalDirPath }) } }); };