From 05125699352363476376e44c878ecf717c8cba92 Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Sun, 21 Jan 2024 12:25:28 +0800 Subject: [PATCH] chore: test copy link --- scripts/postinstall.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/postinstall.js b/scripts/postinstall.js index b660ae3d4..d5af729cb 100755 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -159,11 +159,20 @@ async function main() { }); // Link the binaries in postinstall to support yarn - console.error(path.resolve(".")); await binLinks({ path: path.resolve("."), pkg: { ...pkg, bin: { [pkg.name]: binPath } }, }); + if (platform === "windows") { + const srcPath = path.join( + process.env.INIT_CWD, + "node_modules", + ".bin", + "supabase" + ); + const dstPath = path.join("node_modules", "supabase", "bin"); + await fs.promises.cp(srcPath, dstPath); + } console.info("Installed Supabase CLI successfully"); }