Skip to content

Commit

Permalink
Merge pull request #37 from JohanManders/fix/windows-execa-replace-spawn
Browse files Browse the repository at this point in the history
fix: replace spawn with execa to fix Windows compatibility
  • Loading branch information
ankur-arch authored Nov 28, 2024
2 parents 350a324 + 90dbdad commit a2b3728
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/package-utils/setup-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ export async function generateClient(

export async function installStudio(directory: string) {
try {
const { spawn } = require("child_process");

log(PREDEFINED_LOG_MESSAGES.installStudio.action);

await spawn("npx", ["prisma", "studio", "--browser", "none"], {
cwd: directory,
const subprocess = execa("npx", ["prisma", "studio", "--browser", "none"], {
cwd: directory
});

subprocess.unref();

logSuccess(PREDEFINED_LOG_MESSAGES.installStudio.success);

Expand Down

0 comments on commit a2b3728

Please sign in to comment.