Skip to content

Commit

Permalink
fix: do not prompt for project if --cwd was provided
Browse files Browse the repository at this point in the history
Fixes #5977
  • Loading branch information
zregvart committed Feb 23, 2024
1 parent acafb49 commit cdabd23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/base-command.ts
Expand Up @@ -493,8 +493,9 @@ export default class BaseCommand extends Command {
const frameworks = await this.project.detectFrameworks()
let packageConfig: string | undefined = flags.config ? resolve(flags.config) : undefined
// check if we have detected multiple projects inside which one we have to perform our operations.
// only ask to select one if on the workspace root
// only ask to select one if on the workspace root and no --cwd was provided
if (
!flags.cwd &&
!COMMANDS_WITHOUT_WORKSPACE_OPTIONS.has(actionCommand.name()) &&
this.project.workspace?.packages.length &&
this.project.workspace.isRoot
Expand Down

0 comments on commit cdabd23

Please sign in to comment.