Skip to content

Commit a0faa42

Browse files
committed
fix: workspaces foreach should take --all by default
1 parent c3b319a commit a0faa42

File tree

1 file changed

+3
-0
lines changed
  • packages/plugin-workspace-tools/sources/commands

1 file changed

+3
-0
lines changed

packages/plugin-workspace-tools/sources/commands/foreach.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ export default class WorkspacesForeachCommand extends BaseCommand {
136136
const configuration = await Configuration.find(this.context.cwd, this.context.plugins);
137137
const {project, workspace: cwdWorkspace} = await Project.find(configuration, this.context.cwd);
138138

139+
if ([`all`, `recursive`, `since`, `worktree`].every(opt => this[opt] === undefined))
140+
this.all = true;
141+
139142
if (!this.all && !cwdWorkspace)
140143
throw new WorkspaceRequiredError(project.cwd, this.context.cwd);
141144

0 commit comments

Comments
 (0)