diff --git a/src/commands/plugins/install.ts b/src/commands/plugins/install.ts index c1856984..d62d3346 100644 --- a/src/commands/plugins/install.ts +++ b/src/commands/plugins/install.ts @@ -86,7 +86,7 @@ e.g. If you have a core plugin that has a 'hello' command, installing a user-ins try { if (p.type === 'npm') { ux.action.start( - `Installing plugin ${chalk.cyan(this.plugins.friendlyName(p.name))}`, + `Installing plugin ${chalk.cyan(this.plugins.friendlyName(p.name) + '@' + p.tag)}`, ) plugin = await this.plugins.install(p.name, { tag: p.tag, @@ -107,37 +107,47 @@ e.g. If you have a core plugin that has a 'hello' command, installing a user-ins /* eslint-enable no-await-in-loop */ async parsePlugin(input: string): Promise<{name: string; tag: string; type: 'npm'} | {url: string; type: 'repo'}> { + // git ssh url if (input.startsWith('git+ssh://') || input.endsWith('.git')) { return {url: input, type: 'repo'} } - if (input.includes('@') && input.includes('/')) { - input = input.slice(1) - const [name, tag = 'latest'] = input.split('@') - validateNpmPkgName('@' + name) - return {name: '@' + name, tag, type: 'npm'} + const getNameAndTag = async (input: string): Promise<{name: string; tag: string}> => { + const regexAtSymbolNotAtBeginning = /(?