Skip to content

Commit

Permalink
chore: copy symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Jan 20, 2024
1 parent 4fcf991 commit b64273f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,20 @@ async function main() {
});

// Link the binaries in postinstall to support yarn
// const absPath = path.join(process.env.INIT_CWD, "node_modules", "supabase", binPath)
console.error(binPath, process.platform)
await binLinks({
path: path.resolve("."),
pkg: { ...pkg, bin: { [pkg.name]: binPath } },
});
if (platform == "windows") {
const src = path.join(
process.env.INIT_CWD,
"node_modules",
".bin",
"supabase"
);
const dst = pkg.bin[pkg.name];
await fs.promises.cp(src, dst);
}

console.info("Installed Supabase CLI successfully");
}
Expand Down

0 comments on commit b64273f

Please sign in to comment.