Skip to content

Commit 9f5e44b

Browse files
authored
Use --index-url in PyPi description (#22620) (#22636)
1 parent f204ff4 commit 9f5e44b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: docs/content/doc/packages/pypi.en-us.md

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ For example:
7777
pip install --index-url https://testuser:[email protected]/api/packages/testuser/pypi/simple --no-deps test_package
7878
```
7979

80+
You can use `--extra-index-url` instead of `--index-url` but that makes you vulnerable to dependency confusion attacks because `pip` checks the official PyPi repository for the package before it checks the specified custom repository. Read the `pip` docs for more information.
81+
8082
## Supported commands
8183

8284
```

Diff for: templates/package/content/pypi.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="ui form">
55
<div class="field">
66
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.pypi.install"}}</label>
7-
<div class="markup"><pre class="code-block"><code>pip install --extra-index-url {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple {{.PackageDescriptor.Package.Name}}</code></pre></div>
7+
<div class="markup"><pre class="code-block"><code>pip install --index-url {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple {{.PackageDescriptor.Package.Name}}</code></pre></div>
88
</div>
99
<div class="field">
1010
<label>{{.locale.Tr "packages.pypi.documentation" | Safe}}</label>

0 commit comments

Comments
 (0)