Skip to content

Fix: update latestCliPid after restart in set-* CLI commands#2285

Merged
bcotrim merged 1 commit intodev/studio-cli-i2from
stu-1153-studio-set-cli-commands-should-update-latestclipid-after
Dec 18, 2025
Merged

Fix: update latestCliPid after restart in set-* CLI commands#2285
bcotrim merged 1 commit intodev/studio-cli-i2from
stu-1153-studio-set-cli-commands-should-update-latestclipid-after

Conversation

@bcotrim
Copy link
Contributor

@bcotrim bcotrim commented Dec 18, 2025

Related issues

Proposed Changes

  • Update set-domain, set-https, set-php-version, and set-wp-version CLI commands to call updateSiteLatestCliPid() after restarting a site
  • Add unit test assertions to verify updateSiteLatestCliPid is called with correct site ID and PID when restarting
  • Add unit test assertions to verify updateSiteLatestCliPid is NOT called when site is stopped (no restart needed)

Testing Instructions

  1. Build the CLI: npm run cli:build
  2. Start a site: studio site start --path ~/Studio/mysite --skip-browser
  3. Confirm online: studio site list → 🟢 Online
  4. Run a set command: studio site set-php-version 8.4 --path ~/Studio/mysite
  5. Check again: studio site list → should show 🟢 Online (was 🔴 Offline before fix)
  6. Run unit tests: npm test -- cli/commands/site/tests/set-php-version.test.ts cli/commands/site/tests/set-domain.test.ts cli/commands/site/tests/set-https.test.ts cli/commands/site/tests/set-wp-version.test.ts

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@bcotrim bcotrim self-assigned this Dec 18, 2025
@bcotrim bcotrim requested review from a team and fredrikekelund December 18, 2025 11:32
Copy link
Contributor

@fredrikekelund fredrikekelund left a comment

Choose a reason for hiding this comment

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

Based on just reviewing the code, this LGTM 👍

@fredrikekelund
Copy link
Contributor

Let's change the base branch to dev/studio-cli-i2 and merge this.

@bcotrim bcotrim changed the base branch from trunk to dev/studio-cli-i2 December 18, 2025 15:07
@bcotrim bcotrim merged commit fbf6b06 into dev/studio-cli-i2 Dec 18, 2025
8 of 11 checks passed
@bcotrim bcotrim deleted the stu-1153-studio-set-cli-commands-should-update-latestclipid-after branch December 18, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants