Merge pull request #616 from paperclipai/public/worktree-pnpm-install
Install dependencies after creating worktree
This commit is contained in:
commit
4670f60d3e
1 changed files with 13 additions and 0 deletions
|
|
@ -753,6 +753,19 @@ export async function worktreeMakeCommand(nameArg: string, opts: WorktreeMakeOpt
|
|||
throw new Error(extractExecSyncErrorMessage(error) ?? String(error));
|
||||
}
|
||||
|
||||
const installSpinner = p.spinner();
|
||||
installSpinner.start("Installing dependencies...");
|
||||
try {
|
||||
execFileSync("pnpm", ["install"], {
|
||||
cwd: targetPath,
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
});
|
||||
installSpinner.stop("Installed dependencies.");
|
||||
} catch (error) {
|
||||
installSpinner.stop(pc.yellow("Failed to install dependencies (continuing anyway)."));
|
||||
p.log.warning(extractExecSyncErrorMessage(error) ?? String(error));
|
||||
}
|
||||
|
||||
const originalCwd = process.cwd();
|
||||
try {
|
||||
process.chdir(targetPath);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue