Skip to content

Commit

Permalink
Merge pull request #18195 from storybookjs/fix-cli-throws
Browse files Browse the repository at this point in the history
CLI: don't throw is Ctrl + C was pressed when selecting a package in the build command
  • Loading branch information
yannbf committed May 16, 2022
2 parents 3e2b7f1 + ab06f82 commit 44399d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function run() {
},
]).then(({ mode, todo }) => {
watchMode = mode;
return todo.map((key) => tasks[key]);
return todo?.map((key) => tasks[key]);
});
} else {
// hits here when running yarn build --packagename
Expand All @@ -101,7 +101,7 @@ async function run() {
.filter((item) => item.name !== 'watch' && item.value === true);
}

selection.filter(Boolean).forEach((v) => {
selection?.filter(Boolean).forEach((v) => {
const sub = execa.command(`yarn prepare${watchMode ? ' --watch' : ''}`, {
cwd: resolve(__dirname, '..', v.location),
buffer: false,
Expand Down

0 comments on commit 44399d6

Please sign in to comment.