Skip to content

Commit

Permalink
docs: warn about self commands on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Sep 11, 2023
1 parent d595575 commit 0bdb796
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 26 deletions.
5 changes: 5 additions & 0 deletions docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ If you see something like `Poetry (version 1.2.0)`, your install is ready to use

Poetry is able to update itself when installed using the official installer.

{{% warning %}}
Especially on Windows, `self update` may be problematic
so that a re-install with the installer should be preferred.
{{% /warning %}}

```bash
poetry self update
```
Expand Down
7 changes: 7 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,13 @@ Use of these commands will create the required `pyproject.toml` and `poetry.lock
[configuration directory]({{< relref "configuration" >}}).
{{% /note %}}

{{% warning %}}
Especially on Windows, `self` commands that update or remove packages may be problematic
so that other methods for installing plugins and updating Poetry are recommended.
See [Using plugins]({{< relref "plugins#using-plugins" >}}) and
[Installing Poetry]({{< relref "docs#installation" >}}) for more information.
{{% /warning %}}

### self add

The `self add` command installs Poetry plugins and make them available at runtime. Additionally, it can
Expand Down
55 changes: 29 additions & 26 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,32 +191,6 @@ Installed plugin packages are automatically loaded when Poetry starts up.

You have multiple ways to install plugins for Poetry

### The `self add` command

This is the easiest way and should account for all the ways Poetry can be installed.

```bash
poetry self add poetry-plugin
```

The `self add` command will ensure that the plugin is compatible with the current version of Poetry
and install the needed packages for the plugin to work.

The package specification formats supported by the `self add` command are the same as the ones supported
by the [`add` command]({{< relref "cli#add" >}}).

If you no longer need a plugin and want to uninstall it, you can use the `self remove` command.

```shell
poetry self remove poetry-plugin
```

You can also list all currently installed plugins by running:

```shell
poetry self show plugins
```

### With `pipx inject`

If you used `pipx` to install Poetry you can add the plugin packages via the `pipx inject` command.
Expand Down Expand Up @@ -250,6 +224,35 @@ If you want to uninstall a plugin, you can run:
$POETRY_HOME/bin/pip uninstall poetry-plugin
```

### The `self add` command

{{% warning %}}
Especially on Windows, `self add` and `self remove` may be problematic
so that other methods should be preferred.
{{% /warning %}}

```bash
poetry self add poetry-plugin
```

The `self add` command will ensure that the plugin is compatible with the current version of Poetry
and install the needed packages for the plugin to work.

The package specification formats supported by the `self add` command are the same as the ones supported
by the [`add` command]({{< relref "cli#add" >}}).

If you no longer need a plugin and want to uninstall it, you can use the `self remove` command.

```shell
poetry self remove poetry-plugin
```

You can also list all currently installed plugins by running:

```shell
poetry self show plugins
```


## Maintaining a plugin

Expand Down

0 comments on commit 0bdb796

Please sign in to comment.