We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Verify `meltano install` telemetry fires for malformed plugin entries
In #6109 @pnadolny13 noticed that with the following entry no events where fired:

```yaml
  - name: tap-something-invalid
    variant: meltanolabs
    pip_url: git+https://github.com/foo/tap-something-invalid.git
```

I wasn't able to reproduce that at the time and did see two events (started/aborted) come across. We should double check though, its entirely possible that my local dev setup had a seperate issue that was triggering the `aborted` event.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/meltano/cli/install.py`
Content:
```
1 """CLI command `meltano install`."""
2 from __future__ import annotations
3 
4 import click
5 
6 from meltano.core.legacy_tracking import LegacyTracker
7 from meltano.core.plugin import PluginType
8 from meltano.core.plugin.error import PluginNotFoundError
9 from meltano.core.project_plugins_service import ProjectPluginsService
10 from meltano.core.tracking import PluginsTrackingContext, Tracker
11 from meltano.core.tracking import cli as cli_tracking
12 from meltano.core.tracking import cli_context_builder
13 
14 from . import cli
15 from .params import pass_project
16 from .utils import CliError, install_plugins
17 
18 
19 @cli.command(short_help="Install project dependencies.")
20 @click.argument(
21     "plugin_type", type=click.Choice(PluginType.cli_arguments()), required=False
22 )
23 @click.argument("plugin_name", nargs=-1, required=False)
24 @click.option(
25     "--clean",
26     is_flag=True,
27     help="Completely reinstall a plugin rather than simply upgrading if necessary.",
28 )
29 @click.option(
30     "--parallelism",
31     "-p",
32     type=click.INT,
33     default=None,
34     help="Limit the number of plugins to install in parallel. Defaults to the number of cores.",
35 )
36 @pass_project(migrate=True)
37 def install(project, plugin_type, plugin_name, clean, parallelism):
38     """
39     Install all the dependencies of your project based on the meltano.yml file.
40 
41     \b\nRead more at https://www.meltano.com/docs/command-line-interface.html#install
42     """
43     tracker = Tracker(project)
44     tracker.add_contexts(
45         cli_context_builder(
46             "install",
47             None,
48             clean=clean,
49             parallelism=parallelism,
50         )
51     )
52 
53     plugins_service = ProjectPluginsService(project)
54 
55     if plugin_type:
56         try:
57             plugin_type = PluginType.from_cli_argument(plugin_type)
58         except ValueError:
59             # if we fail because plugin_type is not valid we have no plugins to instrument
60             tracker.track_command_event(cli_tracking.STARTED)
61             tracker.track_command_event(cli_tracking.ABORTED)
62             raise
63         plugins = plugins_service.get_plugins_of_type(plugin_type)
64         if plugin_name:
65             plugins = [plugin for plugin in plugins if plugin.name in plugin_name]
66     else:
67         try:
68             plugins = list(plugins_service.plugins())
69         except PluginNotFoundError:
70             tracker.track_command_event(cli_tracking.STARTED)
71             tracker.track_command_event(cli_tracking.ABORTED)
72             raise
73 
74     click.echo(f"Installing {len(plugins)} plugins...")
75     tracker.add_contexts(
76         PluginsTrackingContext([(candidate, None) for candidate in plugins])
77     )
78     tracker.track_command_event(cli_tracking.STARTED)
79 
80     success = install_plugins(project, plugins, parallelism=parallelism, clean=clean)
81 
82     legacy_tracker = LegacyTracker(project)
83     legacy_tracker.track_meltano_install()
84 
85     if not success:
86         tracker.track_command_event(cli_tracking.FAILED)
87         raise CliError("Failed to install plugin(s)")
88     tracker.track_command_event(cli_tracking.COMPLETED)
89
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/meltano/cli/install.py b/src/meltano/cli/install.py
--- a/src/meltano/cli/install.py
+++ b/src/meltano/cli/install.py
@@ -5,7 +5,6 @@
 
 from meltano.core.legacy_tracking import LegacyTracker
 from meltano.core.plugin import PluginType
-from meltano.core.plugin.error import PluginNotFoundError
 from meltano.core.project_plugins_service import ProjectPluginsService
 from meltano.core.tracking import PluginsTrackingContext, Tracker
 from meltano.core.tracking import cli as cli_tracking
@@ -52,24 +51,18 @@
 
     plugins_service = ProjectPluginsService(project)
 
-    if plugin_type:
-        try:
+    try:
+        if plugin_type:
             plugin_type = PluginType.from_cli_argument(plugin_type)
-        except ValueError:
-            # if we fail because plugin_type is not valid we have no plugins to instrument
-            tracker.track_command_event(cli_tracking.STARTED)
-            tracker.track_command_event(cli_tracking.ABORTED)
-            raise
-        plugins = plugins_service.get_plugins_of_type(plugin_type)
-        if plugin_name:
-            plugins = [plugin for plugin in plugins if plugin.name in plugin_name]
-    else:
-        try:
+            plugins = plugins_service.get_plugins_of_type(plugin_type)
+            if plugin_name:
+                plugins = [plugin for plugin in plugins if plugin.name in plugin_name]
+        else:
             plugins = list(plugins_service.plugins())
-        except PluginNotFoundError:
-            tracker.track_command_event(cli_tracking.STARTED)
-            tracker.track_command_event(cli_tracking.ABORTED)
-            raise
+    except Exception:
+        tracker.track_command_event(cli_tracking.STARTED)
+        tracker.track_command_event(cli_tracking.ABORTED)
+        raise
 
     click.echo(f"Installing {len(plugins)} plugins...")
     tracker.add_contexts(

{"golden_diff": "diff --git a/src/meltano/cli/install.py b/src/meltano/cli/install.py\n--- a/src/meltano/cli/install.py\n+++ b/src/meltano/cli/install.py\n@@ -5,7 +5,6 @@\n \n from meltano.core.legacy_tracking import LegacyTracker\n from meltano.core.plugin import PluginType\n-from meltano.core.plugin.error import PluginNotFoundError\n from meltano.core.project_plugins_service import ProjectPluginsService\n from meltano.core.tracking import PluginsTrackingContext, Tracker\n from meltano.core.tracking import cli as cli_tracking\n@@ -52,24 +51,18 @@\n \n     plugins_service = ProjectPluginsService(project)\n \n-    if plugin_type:\n-        try:\n+    try:\n+        if plugin_type:\n             plugin_type = PluginType.from_cli_argument(plugin_type)\n-        except ValueError:\n-            # if we fail because plugin_type is not valid we have no plugins to instrument\n-            tracker.track_command_event(cli_tracking.STARTED)\n-            tracker.track_command_event(cli_tracking.ABORTED)\n-            raise\n-        plugins = plugins_service.get_plugins_of_type(plugin_type)\n-        if plugin_name:\n-            plugins = [plugin for plugin in plugins if plugin.name in plugin_name]\n-    else:\n-        try:\n+            plugins = plugins_service.get_plugins_of_type(plugin_type)\n+            if plugin_name:\n+                plugins = [plugin for plugin in plugins if plugin.name in plugin_name]\n+        else:\n             plugins = list(plugins_service.plugins())\n-        except PluginNotFoundError:\n-            tracker.track_command_event(cli_tracking.STARTED)\n-            tracker.track_command_event(cli_tracking.ABORTED)\n-            raise\n+    except Exception:\n+        tracker.track_command_event(cli_tracking.STARTED)\n+        tracker.track_command_event(cli_tracking.ABORTED)\n+        raise\n \n     click.echo(f\"Installing {len(plugins)} plugins...\")\n     tracker.add_contexts(\n", "issue": "Verify `meltano install` telemetry fires for malformed plugin entries\nIn #6109 @pnadolny13 noticed that with the following entry no events where fired:\r\n\r\n```yaml\r\n  - name: tap-something-invalid\r\n    variant: meltanolabs\r\n    pip_url: git+https://github.com/foo/tap-something-invalid.git\r\n```\r\n\r\nI wasn't able to reproduce that at the time and did see two events (started/aborted) come across. We should double check though, its entirely possible that my local dev setup had a seperate issue that was triggering the `aborted` event.\n", "before_files": [{"content": "\"\"\"CLI command `meltano install`.\"\"\"\nfrom __future__ import annotations\n\nimport click\n\nfrom meltano.core.legacy_tracking import LegacyTracker\nfrom meltano.core.plugin import PluginType\nfrom meltano.core.plugin.error import PluginNotFoundError\nfrom meltano.core.project_plugins_service import ProjectPluginsService\nfrom meltano.core.tracking import PluginsTrackingContext, Tracker\nfrom meltano.core.tracking import cli as cli_tracking\nfrom meltano.core.tracking import cli_context_builder\n\nfrom . import cli\nfrom .params import pass_project\nfrom .utils import CliError, install_plugins\n\n\n@cli.command(short_help=\"Install project dependencies.\")\n@click.argument(\n    \"plugin_type\", type=click.Choice(PluginType.cli_arguments()), required=False\n)\n@click.argument(\"plugin_name\", nargs=-1, required=False)\n@click.option(\n    \"--clean\",\n    is_flag=True,\n    help=\"Completely reinstall a plugin rather than simply upgrading if necessary.\",\n)\n@click.option(\n    \"--parallelism\",\n    \"-p\",\n    type=click.INT,\n    default=None,\n    help=\"Limit the number of plugins to install in parallel. Defaults to the number of cores.\",\n)\n@pass_project(migrate=True)\ndef install(project, plugin_type, plugin_name, clean, parallelism):\n    \"\"\"\n    Install all the dependencies of your project based on the meltano.yml file.\n\n    \\b\\nRead more at https://www.meltano.com/docs/command-line-interface.html#install\n    \"\"\"\n    tracker = Tracker(project)\n    tracker.add_contexts(\n        cli_context_builder(\n            \"install\",\n            None,\n            clean=clean,\n            parallelism=parallelism,\n        )\n    )\n\n    plugins_service = ProjectPluginsService(project)\n\n    if plugin_type:\n        try:\n            plugin_type = PluginType.from_cli_argument(plugin_type)\n        except ValueError:\n            # if we fail because plugin_type is not valid we have no plugins to instrument\n            tracker.track_command_event(cli_tracking.STARTED)\n            tracker.track_command_event(cli_tracking.ABORTED)\n            raise\n        plugins = plugins_service.get_plugins_of_type(plugin_type)\n        if plugin_name:\n            plugins = [plugin for plugin in plugins if plugin.name in plugin_name]\n    else:\n        try:\n            plugins = list(plugins_service.plugins())\n        except PluginNotFoundError:\n            tracker.track_command_event(cli_tracking.STARTED)\n            tracker.track_command_event(cli_tracking.ABORTED)\n            raise\n\n    click.echo(f\"Installing {len(plugins)} plugins...\")\n    tracker.add_contexts(\n        PluginsTrackingContext([(candidate, None) for candidate in plugins])\n    )\n    tracker.track_command_event(cli_tracking.STARTED)\n\n    success = install_plugins(project, plugins, parallelism=parallelism, clean=clean)\n\n    legacy_tracker = LegacyTracker(project)\n    legacy_tracker.track_meltano_install()\n\n    if not success:\n        tracker.track_command_event(cli_tracking.FAILED)\n        raise CliError(\"Failed to install plugin(s)\")\n    tracker.track_command_event(cli_tracking.COMPLETED)\n", "path": "src/meltano/cli/install.py"}], "after_files": [{"content": "\"\"\"CLI command `meltano install`.\"\"\"\nfrom __future__ import annotations\n\nimport click\n\nfrom meltano.core.legacy_tracking import LegacyTracker\nfrom meltano.core.plugin import PluginType\nfrom meltano.core.project_plugins_service import ProjectPluginsService\nfrom meltano.core.tracking import PluginsTrackingContext, Tracker\nfrom meltano.core.tracking import cli as cli_tracking\nfrom meltano.core.tracking import cli_context_builder\n\nfrom . import cli\nfrom .params import pass_project\nfrom .utils import CliError, install_plugins\n\n\n@cli.command(short_help=\"Install project dependencies.\")\n@click.argument(\n    \"plugin_type\", type=click.Choice(PluginType.cli_arguments()), required=False\n)\n@click.argument(\"plugin_name\", nargs=-1, required=False)\n@click.option(\n    \"--clean\",\n    is_flag=True,\n    help=\"Completely reinstall a plugin rather than simply upgrading if necessary.\",\n)\n@click.option(\n    \"--parallelism\",\n    \"-p\",\n    type=click.INT,\n    default=None,\n    help=\"Limit the number of plugins to install in parallel. Defaults to the number of cores.\",\n)\n@pass_project(migrate=True)\ndef install(project, plugin_type, plugin_name, clean, parallelism):\n    \"\"\"\n    Install all the dependencies of your project based on the meltano.yml file.\n\n    \\b\\nRead more at https://www.meltano.com/docs/command-line-interface.html#install\n    \"\"\"\n    tracker = Tracker(project)\n    tracker.add_contexts(\n        cli_context_builder(\n            \"install\",\n            None,\n            clean=clean,\n            parallelism=parallelism,\n        )\n    )\n\n    plugins_service = ProjectPluginsService(project)\n\n    try:\n        if plugin_type:\n            plugin_type = PluginType.from_cli_argument(plugin_type)\n            plugins = plugins_service.get_plugins_of_type(plugin_type)\n            if plugin_name:\n                plugins = [plugin for plugin in plugins if plugin.name in plugin_name]\n        else:\n            plugins = list(plugins_service.plugins())\n    except Exception:\n        tracker.track_command_event(cli_tracking.STARTED)\n        tracker.track_command_event(cli_tracking.ABORTED)\n        raise\n\n    click.echo(f\"Installing {len(plugins)} plugins...\")\n    tracker.add_contexts(\n        PluginsTrackingContext([(candidate, None) for candidate in plugins])\n    )\n    tracker.track_command_event(cli_tracking.STARTED)\n\n    success = install_plugins(project, plugins, parallelism=parallelism, clean=clean)\n\n    legacy_tracker = LegacyTracker(project)\n    legacy_tracker.track_meltano_install()\n\n    if not success:\n        tracker.track_command_event(cli_tracking.FAILED)\n        raise CliError(\"Failed to install plugin(s)\")\n    tracker.track_command_event(cli_tracking.COMPLETED)\n", "path": "src/meltano/cli/install.py"}]}