From fcf0869a694897cea11e905bdd0abc026d7a740d Mon Sep 17 00:00:00 2001 From: the-sun-will-rise-tomorrow <143541718+the-sun-will-rise-tomorrow@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:03:01 +0000 Subject: [PATCH] src/generate.ts: Create the nixExprPath directory if it doesn't exist This can happen in a multi-project workspace, where only some projects use Nix; in this case, the directory with Nix-related files may not exist in some build environments. --- src/generate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generate.ts b/src/generate.ts index c7beb10..2d75218 100644 --- a/src/generate.ts +++ b/src/generate.ts @@ -395,6 +395,7 @@ export default async ( USES_PNP_LINKER: configuration.get("nodeLinker") === "pnp", USES_NM_LINKER: configuration.get("nodeLinker") === "node-modules", }).replace(/\n\n\n+/g, "\n\n"); + await xfs.mkdirpPromise(ppath.dirname(nixExprPath)); await xfs.writeFilePromise(nixExprPath, projectExpr); // Create a wrapper if it does not exist yet.