Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooling: Fix jetpack cli link and unlink #42130

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tools/cli/commands/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ function cliLink( options ) {
[
{
title: chalkJetpackGreen( `Enabling global access to the CLI` ),
task: () => command( 'pnpm link', options.v, path.resolve( 'tools/cli' ) ),
// Theoretically we shouldn't need the --global as of v10.0, but there was a bug until 10.5.
// It shouldn't hurt to leave this.
task: () => command( 'pnpm link --global', options.v, path.resolve( 'tools/cli' ) ),
},
],
opts
Expand Down Expand Up @@ -87,7 +89,9 @@ function cliUnlink( options ) {
[
{
title: chalkJetpackGreen( `Removing global access to the CLI` ),
task: () => command( 'pnpm unlink', options.v, path.resolve( 'tools/cli' ) ),
// In theory unlink should work, but it doesn't (and there are dozens of issues related
// to link/unlink in the pnpm repo. This works well.
task: () => command( 'pnpm uninstall --global jetpack-cli', options.v ),
},
],
opts
Expand Down
Loading