Skip to content

Conversation

@nightnei
Copy link
Contributor

@nightnei nightnei commented Jan 7, 2026

Related issues

Proposed Changes

Removes the studio site stop-all CLI command in favor of an --all option in the studio site stop command

Off topic: I am working on trying to simplify code to have one function to stop either one or all sites, but so far I don't like the result, so I decided to create this PR, and then I will work a bit more to try to make code more beautiful.

Testing Instructions

  1. npm run cli:build
  2. Create 3 sites
  3. node dist/cli/main.js site list
  4. Assert that all of them are run
  5. node dist/cli/main.js site stop --all
  6. Assert that all of them are stopped
  7. Run again node dist/cli/main.js site stop-all
  8. Assert No sites are currently running
  9. Start 1 site
  10. node dist/cli/main.js site stop --all
  11. Assert that you see the message that only one was stopped
  12. node dist/cli/main.js site stop --path=/path/to/site
  13. Assert that one site was stopped w/o regressions

@nightnei nightnei requested a review from a team January 7, 2026 17:46
@nightnei nightnei self-assigned this Jan 7, 2026
@nightnei nightnei changed the title Re-enable WP-CLI execution in the child process (#2261) CLI: Replace stop-all command with --all option in site stop Jan 7, 2026
} );
} );

describe( 'CLI: studio site stop --all', () => {
Copy link
Contributor Author

@nightnei nightnei Jan 7, 2026

Choose a reason for hiding this comment

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

Nothing new or changed here, I just moved all tests as is

@fredrikekelund
Copy link
Contributor

My bad for pushing e973903. That commit was meant for #2299.

@fredrikekelund
Copy link
Contributor

While it's not a huge deal, it still irked me that this is the only command with two different runCommand functions. I opened #2374 with a suggestion for how we could refactor those two functions into a single one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants