Skip to content

Commit

Permalink
Merge pull request #24079 from storybookjs/cli/fix-add-command
Browse files Browse the repository at this point in the history
CLI: Fix packageManager handling in `sb add`
(cherry picked from commit 0cb9932)
  • Loading branch information
Shaun Evening authored and storybook-bot committed Sep 6, 2023
1 parent b08191f commit 10d0aa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/addons/themes/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { spawn } = require('child_process');

const PACKAGE_MANAGER_TO_COMMAND = {
npm: 'npx',
yarn1: 'yarn dlx',
yarn1: 'npx',
yarn2: 'yarn dlx',
pnpm: 'pnpm dlx',
};
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ export async function add(
await writeConfig(main);

if (!options.skipPostinstall && isStorybookAddon) {
await postinstallAddon(addonName, { packageManager: pkgMgr });
await postinstallAddon(addonName, { packageManager: packageManager.type });
}
}

0 comments on commit 10d0aa2

Please sign in to comment.