Merge branch 'dev' into update-oauth-docs

This commit is contained in:
Konsti Wohlwend 2025-09-08 17:11:09 -07:00 committed by GitHub
commit f93ce8a7eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -234,8 +234,19 @@ async function main(): Promise<void> {
// Install dependencies
console.log();
console.log(colorize.bold`Installing dependencies...`);
const installCommand = packageManager === "yarn" ? "yarn add" : `${packageManager} install`;
await shellNicelyFormatted(`${installCommand} ${packagesToInstall.join(' ')}`, {
const installCommandMap = new Map<string, string>([
["npm", "npm install"],
["yarn", "yarn add"],
["pnpm", "pnpm add"],
["bun", "bun add"],
]);
const installCommand = installCommandMap.get(packageManager) ?? `${packageManager} install`;
// Quote each package name to avoid shell interpretation of env-overridden values.
const safePackages = packagesToInstall.map((p) => JSON.stringify(p));
await shellNicelyFormatted(`${installCommand} ${safePackages.join(' ')}`, {
shell: true,
cwd: projectPath,
});
shell: true,
cwd: projectPath,
});