mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-18 03:13:48 +00:00
Make --offline a global argument (#3729)
This commit is contained in:
parent
285adaed64
commit
d33577fc16
6 changed files with 60 additions and 129 deletions
|
|
@ -42,6 +42,7 @@ impl Combine for Options {
|
|||
fn combine(self, other: Options) -> Options {
|
||||
Options {
|
||||
native_tls: self.native_tls.combine(other.native_tls),
|
||||
offline: self.offline.combine(other.offline),
|
||||
no_cache: self.no_cache.combine(other.no_cache),
|
||||
preview: self.preview.combine(other.preview),
|
||||
cache_dir: self.cache_dir.combine(other.cache_dir),
|
||||
|
|
@ -68,7 +69,6 @@ impl Combine for PipOptions {
|
|||
.break_system_packages
|
||||
.combine(other.break_system_packages),
|
||||
target: self.target.combine(other.target),
|
||||
offline: self.offline.combine(other.offline),
|
||||
index_url: self.index_url.combine(other.index_url),
|
||||
extra_index_url: self.extra_index_url.combine(other.extra_index_url),
|
||||
no_index: self.no_index.combine(other.no_index),
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ pub(crate) struct Tools {
|
|||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub struct Options {
|
||||
pub native_tls: Option<bool>,
|
||||
pub offline: Option<bool>,
|
||||
pub no_cache: Option<bool>,
|
||||
pub preview: Option<bool>,
|
||||
pub cache_dir: Option<PathBuf>,
|
||||
|
|
@ -48,7 +49,6 @@ pub struct PipOptions {
|
|||
pub system: Option<bool>,
|
||||
pub break_system_packages: Option<bool>,
|
||||
pub target: Option<PathBuf>,
|
||||
pub offline: Option<bool>,
|
||||
pub index_url: Option<IndexUrl>,
|
||||
pub extra_index_url: Option<Vec<IndexUrl>>,
|
||||
pub no_index: Option<bool>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue