prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Document the --no-root option
  <!--
    Hi there! Thank you for wanting to make Poetry better.
  
    Before you submit this; let's make sure of a few things.
    Please make sure the following boxes are ticked if they are correct.
    If not, please try and fulfill these first.
  -->
  
  <!-- Checked checkbox should look like this: [x] -->
  - [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.
  - [x] I have searched the [documentation](https://python-poetry.org/docs/) and believe that my question is not covered.
  
  ## Feature Request
  <!-- Now feel free to write your idea for improvement. Thanks again 🙌 ❤️ -->
  The `--no-root` option described in https://github.com/python-poetry/poetry/issues/1525 works fine for installation. Unfortunately I found it only when looking for duplicate issues before raising this. `poetry help install` does not describe that option.
  
  Please add it to the `help install` output.
  Document the --no-root option
  <!--
    Hi there! Thank you for wanting to make Poetry better.
  
    Before you submit this; let's make sure of a few things.
    Please make sure the following boxes are ticked if they are correct.
    If not, please try and fulfill these first.
  -->
  
  <!-- Checked checkbox should look like this: [x] -->
  - [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.
  - [x] I have searched the [documentation](https://python-poetry.org/docs/) and believe that my question is not covered.
  
  ## Feature Request
  <!-- Now feel free to write your idea for improvement. Thanks again 🙌 ❤️ -->
  The `--no-root` option described in https://github.com/python-poetry/poetry/issues/1525 works fine for installation. Unfortunately I found it only when looking for duplicate issues before raising this. `poetry help install` does not describe that option.
  
  Please add it to the `help install` output.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `poetry/console/commands/install.py`
  Content:
  ```
  1 from cleo import option
  2 
  3 from .env_command import EnvCommand
  4 
  5 
  6 class InstallCommand(EnvCommand):
  7 
  8     name = "install"
  9     description = "Installs the project dependencies."
  10 
  11     options = [
  12         option("no-dev", None, "Do not install the development dependencies."),
  13         option(
  14             "no-root", None, "Do not install the root package (the current project)."
  15         ),
  16         option(
  17             "dry-run",
  18             None,
  19             "Output the operations but do not execute anything "
  20             "(implicitly enables --verbose).",
  21         ),
  22         option(
  23             "extras",
  24             "E",
  25             "Extra sets of dependencies to install.",
  26             flag=False,
  27             multiple=True,
  28         ),
  29     ]
  30 
  31     help = """The <info>install</info> command reads the <comment>poetry.lock</> file from
  32 the current directory, processes it, and downloads and installs all the
  33 libraries and dependencies outlined in that file. If the file does not
  34 exist it will look for <comment>pyproject.toml</> and do the same.
  35 
  36 <info>poetry install</info>
  37 """
  38 
  39     _loggers = ["poetry.repositories.pypi_repository"]
  40 
  41     def handle(self):
  42         from clikit.io import NullIO
  43         from poetry.installation.installer import Installer
  44         from poetry.masonry.builders import EditableBuilder
  45         from poetry.masonry.utils.module import ModuleOrPackageNotFound
  46 
  47         installer = Installer(
  48             self.io, self.env, self.poetry.package, self.poetry.locker, self.poetry.pool
  49         )
  50 
  51         extras = []
  52         for extra in self.option("extras"):
  53             if " " in extra:
  54                 extras += [e.strip() for e in extra.split(" ")]
  55             else:
  56                 extras.append(extra)
  57 
  58         installer.extras(extras)
  59         installer.dev_mode(not self.option("no-dev"))
  60         installer.dry_run(self.option("dry-run"))
  61         installer.verbose(self.option("verbose"))
  62 
  63         return_code = installer.run()
  64 
  65         if return_code != 0:
  66             return return_code
  67 
  68         if self.option("no-root"):
  69             return 0
  70 
  71         try:
  72             builder = EditableBuilder(self.poetry, self._env, NullIO())
  73         except ModuleOrPackageNotFound:
  74             # This is likely due to the fact that the project is an application
  75             # not following the structure expected by Poetry
  76             # If this is a true error it will be picked up later by build anyway.
  77             return 0
  78 
  79         self.line(
  80             "  - Installing <c1>{}</c1> (<b>{}</b>)".format(
  81                 self.poetry.package.pretty_name, self.poetry.package.pretty_version
  82             )
  83         )
  84 
  85         if self.option("dry-run"):
  86             return 0
  87 
  88         builder.build()
  89 
  90         return 0
  91
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py
  --- a/poetry/console/commands/install.py
  +++ b/poetry/console/commands/install.py
  @@ -34,6 +34,12 @@
   exist it will look for <comment>pyproject.toml</> and do the same.
   
   <info>poetry install</info>
  +
  +By default, the above command will also install the current project. To install only the
  +dependencies and not including the current project, run the command with the
  +<info>--no-root</info> option like below:
  +
  +<info> poetry install --no-root</info>
   """
   
       _loggers = ["poetry.repositories.pypi_repository"]
  
verification_info: {"golden_diff": "diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py\n--- a/poetry/console/commands/install.py\n+++ b/poetry/console/commands/install.py\n@@ -34,6 +34,12 @@\n exist it will look for <comment>pyproject.toml</> and do the same.\n \n <info>poetry install</info>\n+\n+By default, the above command will also install the current project. To install only the\n+dependencies and not including the current project, run the command with the\n+<info>--no-root</info> option like below:\n+\n+<info> poetry install --no-root</info>\n \"\"\"\n \n     _loggers = [\"poetry.repositories.pypi_repository\"]\n", "issue": "Document the --no-root option\n<!--\r\n  Hi there! Thank you for wanting to make Poetry better.\r\n\r\n  Before you submit this; let's make sure of a few things.\r\n  Please make sure the following boxes are ticked if they are correct.\r\n  If not, please try and fulfill these first.\r\n-->\r\n\r\n<!-- Checked checkbox should look like this: [x] -->\r\n- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.\r\n- [x] I have searched the [documentation](https://python-poetry.org/docs/) and believe that my question is not covered.\r\n\r\n## Feature Request\r\n<!-- Now feel free to write your idea for improvement. Thanks again \ud83d\ude4c \u2764\ufe0f -->\r\nThe `--no-root` option described in https://github.com/python-poetry/poetry/issues/1525 works fine for installation. Unfortunately I found it only when looking for duplicate issues before raising this. `poetry help install` does not describe that option.\r\n\r\nPlease add it to the `help install` output.\nDocument the --no-root option\n<!--\r\n  Hi there! Thank you for wanting to make Poetry better.\r\n\r\n  Before you submit this; let's make sure of a few things.\r\n  Please make sure the following boxes are ticked if they are correct.\r\n  If not, please try and fulfill these first.\r\n-->\r\n\r\n<!-- Checked checkbox should look like this: [x] -->\r\n- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.\r\n- [x] I have searched the [documentation](https://python-poetry.org/docs/) and believe that my question is not covered.\r\n\r\n## Feature Request\r\n<!-- Now feel free to write your idea for improvement. Thanks again \ud83d\ude4c \u2764\ufe0f -->\r\nThe `--no-root` option described in https://github.com/python-poetry/poetry/issues/1525 works fine for installation. Unfortunately I found it only when looking for duplicate issues before raising this. `poetry help install` does not describe that option.\r\n\r\nPlease add it to the `help install` output.\n", "before_files": [{"content": "from cleo import option\n\nfrom .env_command import EnvCommand\n\n\nclass InstallCommand(EnvCommand):\n\n    name = \"install\"\n    description = \"Installs the project dependencies.\"\n\n    options = [\n        option(\"no-dev\", None, \"Do not install the development dependencies.\"),\n        option(\n            \"no-root\", None, \"Do not install the root package (the current project).\"\n        ),\n        option(\n            \"dry-run\",\n            None,\n            \"Output the operations but do not execute anything \"\n            \"(implicitly enables --verbose).\",\n        ),\n        option(\n            \"extras\",\n            \"E\",\n            \"Extra sets of dependencies to install.\",\n            flag=False,\n            multiple=True,\n        ),\n    ]\n\n    help = \"\"\"The <info>install</info> command reads the <comment>poetry.lock</> file from\nthe current directory, processes it, and downloads and installs all the\nlibraries and dependencies outlined in that file. If the file does not\nexist it will look for <comment>pyproject.toml</> and do the same.\n\n<info>poetry install</info>\n\"\"\"\n\n    _loggers = [\"poetry.repositories.pypi_repository\"]\n\n    def handle(self):\n        from clikit.io import NullIO\n        from poetry.installation.installer import Installer\n        from poetry.masonry.builders import EditableBuilder\n        from poetry.masonry.utils.module import ModuleOrPackageNotFound\n\n        installer = Installer(\n            self.io, self.env, self.poetry.package, self.poetry.locker, self.poetry.pool\n        )\n\n        extras = []\n        for extra in self.option(\"extras\"):\n            if \" \" in extra:\n                extras += [e.strip() for e in extra.split(\" \")]\n            else:\n                extras.append(extra)\n\n        installer.extras(extras)\n        installer.dev_mode(not self.option(\"no-dev\"))\n        installer.dry_run(self.option(\"dry-run\"))\n        installer.verbose(self.option(\"verbose\"))\n\n        return_code = installer.run()\n\n        if return_code != 0:\n            return return_code\n\n        if self.option(\"no-root\"):\n            return 0\n\n        try:\n            builder = EditableBuilder(self.poetry, self._env, NullIO())\n        except ModuleOrPackageNotFound:\n            # This is likely due to the fact that the project is an application\n            # not following the structure expected by Poetry\n            # If this is a true error it will be picked up later by build anyway.\n            return 0\n\n        self.line(\n            \"  - Installing <c1>{}</c1> (<b>{}</b>)\".format(\n                self.poetry.package.pretty_name, self.poetry.package.pretty_version\n            )\n        )\n\n        if self.option(\"dry-run\"):\n            return 0\n\n        builder.build()\n\n        return 0\n", "path": "poetry/console/commands/install.py"}], "after_files": [{"content": "from cleo import option\n\nfrom .env_command import EnvCommand\n\n\nclass InstallCommand(EnvCommand):\n\n    name = \"install\"\n    description = \"Installs the project dependencies.\"\n\n    options = [\n        option(\"no-dev\", None, \"Do not install the development dependencies.\"),\n        option(\n            \"no-root\", None, \"Do not install the root package (the current project).\"\n        ),\n        option(\n            \"dry-run\",\n            None,\n            \"Output the operations but do not execute anything \"\n            \"(implicitly enables --verbose).\",\n        ),\n        option(\n            \"extras\",\n            \"E\",\n            \"Extra sets of dependencies to install.\",\n            flag=False,\n            multiple=True,\n        ),\n    ]\n\n    help = \"\"\"The <info>install</info> command reads the <comment>poetry.lock</> file from\nthe current directory, processes it, and downloads and installs all the\nlibraries and dependencies outlined in that file. If the file does not\nexist it will look for <comment>pyproject.toml</> and do the same.\n\n<info>poetry install</info>\n\nBy default, the above command will also install the current project. To install only the\ndependencies and not including the current project, run the command with the\n<info>--no-root</info> option like below:\n\n<info> poetry install --no-root</info>\n\"\"\"\n\n    _loggers = [\"poetry.repositories.pypi_repository\"]\n\n    def handle(self):\n        from clikit.io import NullIO\n        from poetry.installation.installer import Installer\n        from poetry.masonry.builders import EditableBuilder\n        from poetry.masonry.utils.module import ModuleOrPackageNotFound\n\n        installer = Installer(\n            self.io, self.env, self.poetry.package, self.poetry.locker, self.poetry.pool\n        )\n\n        extras = []\n        for extra in self.option(\"extras\"):\n            if \" \" in extra:\n                extras += [e.strip() for e in extra.split(\" \")]\n            else:\n                extras.append(extra)\n\n        installer.extras(extras)\n        installer.dev_mode(not self.option(\"no-dev\"))\n        installer.dry_run(self.option(\"dry-run\"))\n        installer.verbose(self.option(\"verbose\"))\n\n        return_code = installer.run()\n\n        if return_code != 0:\n            return return_code\n\n        if self.option(\"no-root\"):\n            return 0\n\n        try:\n            builder = EditableBuilder(self.poetry, self._env, NullIO())\n        except ModuleOrPackageNotFound:\n            # This is likely due to the fact that the project is an application\n            # not following the structure expected by Poetry\n            # If this is a true error it will be picked up later by build anyway.\n            return 0\n\n        self.line(\n            \"  - Installing <c1>{}</c1> (<b>{}</b>)\".format(\n                self.poetry.package.pretty_name, self.poetry.package.pretty_version\n            )\n        )\n\n        if self.option(\"dry-run\"):\n            return 0\n\n        builder.build()\n\n        return 0\n", "path": "poetry/console/commands/install.py"}]}