Skip to content

Remove --path option from studio sites list commands - #1758

Merged
youknowriad merged 1 commit into
add/list-sites-commandfrom
update/hide-path-from-list-sites-command
Sep 11, 2025
Merged

Remove --path option from studio sites list commands#1758
youknowriad merged 1 commit into
add/list-sites-commandfrom
update/hide-path-from-list-sites-command

Conversation

@sejas

@sejas sejas commented Sep 10, 2025

Copy link
Copy Markdown
Member

Related issues

Proposed Changes

  • I suggest removing the --path option from the studio sites group of commands.

Testing Instructions

  • Run npm run cli:build
  • Run node ./dist/cli/main.js sites list --help
  • Observe the --path parameter option is not offered as a possibility
  • Run node ./dist/cli/main.js sites
  • Observe the --path parameter option is not offered as a possibility
  • Run node dist/cli/main.js preview --help
  • Observe the --path parameter is still offered as an option: --path Path to the WordPress files [string] [default: Current directory]
Before After
studio-cli-paths-before studio-cli-paths-after

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@sejas
sejas changed the base branch from trunk to add/list-sites-command September 10, 2025 20:27
@sejas
sejas requested a review from youknowriad September 10, 2025 20:27
@sejas sejas self-assigned this Sep 10, 2025
@sejas sejas changed the title Update/hide path from list sites command Sep 10, 2025
Comment thread cli/index.ts
.command( 'sites', __( 'Manage local sites' ), ( sitesYargs ) => {
sitesYargs.option( 'path', {
hidden: true,
} );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if it's better to actually just make this option explicit in the preview commands (and the newer commands that need it). But I'm hesitant. so this work for me :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep! Either way will work.
I thought that studio sync might need the --path parameter, so I decided to take this approach.

@youknowriad
youknowriad merged commit c794bb6 into add/list-sites-command Sep 11, 2025
14 of 17 checks passed
@youknowriad
youknowriad deleted the update/hide-path-from-list-sites-command branch September 11, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants