Skip to content

Fix hardcoded wp-cli execution paths - #606

Merged
sejas merged 1 commit into
trunkfrom
fix/wp-cli-mac
Oct 17, 2024
Merged

Fix hardcoded wp-cli execution paths#606
sejas merged 1 commit into
trunkfrom
fix/wp-cli-mac

Conversation

@sejas

@sejas sejas commented Oct 17, 2024

Copy link
Copy Markdown
Member

Related to p1729153254575689-slack-C06DRMD6VPZ

Proposed Changes

  • Fix wp-cli execution from terminal on Mac when the feature is enabled

In dev mode, when running npm start, wp-cli in wasm is loaded correctly in the terminal, because it takes the path of the dev Electron + the path of the project and it considers that as a single command. It seems it didn't work before either. It was introduced on #268
If we consider something important, we can create an issue to tackle it separately.

Testing Instructions

  • Run npm run make && STUDIO_TERMINAL_WP_CLI=true open out/Studio-darwin-arm64/Studio.app/Contents/MacOS/Studio
  • Observe Studio opens correctly
  • Click on "terminal" in the overview page
  • Run wp --version
  • Observe it returns WP-CLI 2.11.0.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@sejas sejas self-assigned this Oct 17, 2024
@sejas
sejas requested a review from a team October 17, 2024 11:57
@katinthehatsite

Copy link
Copy Markdown
Contributor

If we consider something important, we can create an issue to tackle it separately.

I think it makes sense to at least document the issue separately so that we are aware that it exists.

@katinthehatsite katinthehatsite left a comment

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.

The changes look good to me 👍 Thanks for the fix!

There is a small typo in the command pm run make instead of npm run make in the testing steps.

@sejas
sejas merged commit b33eace into trunk Oct 17, 2024
@sejas
sejas deleted the fix/wp-cli-mac branch October 17, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants