fix "pnpm run plugins install ep_xxx" (#7093)

With previous code, "pnpm run plugins i ep_xxx" is working correctly, but "pnpm run plugins install ep_xxx" does not work correctly (since var `registryPlugins` is empty)

Either "pnpm run plugins install ep_xxx" should be disallowed (by removing `case "install"`) or this fix should be applied.
This commit is contained in:
Pascal Rigaux 2025-08-25 19:50:31 +02:00 committed by GitHub
parent 2f26cc0c86
commit 90517c12c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,7 +24,7 @@ const possibleActions = [
const install = ()=> {
const argsAsString: string = args.join(" ");
const regexRegistryPlugins = /(?<=i\s)(.*?)(?=--github|--path|$)/;
const regexRegistryPlugins = /(?<=(?:i|install)\s)(.*?)(?=--github|--path|$)/;
const regexLocalPlugins = /(?<=--path\s)(.*?)(?=--github|$)/;
const regexGithubPlugins = /(?<=--github\s)(.*?)(?=--path|$)/;
const registryPlugins = argsAsString.match(regexRegistryPlugins)?.[0]?.split(" ")?.filter(s => s) || [];