Fix bug in --editable, closes #136

This commit is contained in:
Simon Willison 2023-07-25 22:18:45 -07:00
parent 3c2ef73f78
commit 65d16663f5
2 changed files with 4 additions and 5 deletions

View file

@ -290,9 +290,9 @@ Usage: llm install [OPTIONS] [PACKAGES]...
Install packages from PyPI into the same environment as LLM
Options:
-U, --upgrade Upgrade packages to latest version
-e, --editable DIRECTORY Install a project in editable mode from this path
--help Show this message and exit.
-U, --upgrade Upgrade packages to latest version
-e, --editable TEXT Install a project in editable mode from this path
--help Show this message and exit.
```
### llm uninstall --help
```

View file

@ -609,7 +609,6 @@ def templates_path():
@click.option(
"-e",
"--editable",
type=click.Path(readable=True, exists=True, dir_okay=True, file_okay=False),
help="Install a project in editable mode from this path",
)
def install(packages, upgrade, editable):
@ -618,7 +617,7 @@ def install(packages, upgrade, editable):
if upgrade:
args += ["--upgrade"]
if editable:
args += ["--editable", str(editable)]
args += ["--editable", editable]
args += list(packages)
sys.argv = args
run_module("pip", run_name="__main__")