Skip to content

Commit

Permalink
fix: do not prompt for project if --cwd was provided (#6362)
Browse files Browse the repository at this point in the history
Fixes #5977

Co-authored-by: Sarah Etter <sarah.etter@netlify.com>
  • Loading branch information
zregvart and sarahetter committed May 2, 2024
1 parent 0d2a7db commit 7e13196
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

2 comments on commit 7e13196

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,329
  • Package size: 310 MB
  • Number of ts-expect-error directives: 997

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📊 Benchmark results

  • Dependency count: 1,329
  • Package size: 310 MB
  • Number of ts-expect-error directives: 997

Please sign in to comment.