Add uv run --no-sync (#7192)

## Summary

When `--no-sync` is provided, we won't lock or sync, but we will run the
command in the project environment.

Closes https://github.com/astral-sh/uv/issues/7165.
This commit is contained in:
Charlie Marsh 2024-09-10 17:29:43 -04:00 committed by GitHub
parent 4b7fed84eb
commit 3f011f3b7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 142 additions and 56 deletions

View file

@ -265,6 +265,10 @@ uv run [OPTIONS] <COMMAND>
</dd><dt><code>--no-sources</code></dt><dd><p>Ignore the <code>tool.uv.sources</code> table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources</p>
</dd><dt><code>--no-sync</code></dt><dd><p>Avoid syncing the virtual environment.</p>
<p>Implies <code>--frozen</code>, as the project dependencies will be ignored (i.e., the lockfile will not be updated, since the environment will not be synced regardless).</p>
</dd><dt><code>--offline</code></dt><dd><p>Disable network access.</p>
<p>When disabled, uv will only use locally cached data and locally available files.</p>
@ -721,7 +725,7 @@ uv add [OPTIONS] <PACKAGES|--requirements <REQUIREMENTS>>
</dd><dt><code>--no-sources</code></dt><dd><p>Ignore the <code>tool.uv.sources</code> table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources</p>
</dd><dt><code>--no-sync</code></dt><dd><p>Avoid syncing the virtual environment after re-locking the project</p>
</dd><dt><code>--no-sync</code></dt><dd><p>Avoid syncing the virtual environment</p>
</dd><dt><code>--offline</code></dt><dd><p>Disable network access.</p>