mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix: always derive http client from cli flags (#17029)
I'm not sure how to test this. It doesn't seem to have an existing test. Closes #15921
This commit is contained in:
parent
8c026dab92
commit
8972ebc9cc
6 changed files with 42 additions and 49 deletions
|
@ -203,7 +203,6 @@ pub struct UpgradeFlags {
|
|||
pub canary: bool,
|
||||
pub version: Option<String>,
|
||||
pub output: Option<PathBuf>,
|
||||
pub ca_file: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
|
||||
|
@ -2882,14 +2881,12 @@ fn upgrade_parse(flags: &mut Flags, matches: &clap::ArgMatches) {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
let ca_file = matches.value_of("cert").map(|s| s.to_string());
|
||||
flags.subcommand = DenoSubcommand::Upgrade(UpgradeFlags {
|
||||
dry_run,
|
||||
force,
|
||||
canary,
|
||||
version,
|
||||
output,
|
||||
ca_file,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -3302,7 +3299,6 @@ mod tests {
|
|||
canary: false,
|
||||
version: None,
|
||||
output: None,
|
||||
ca_file: None,
|
||||
}),
|
||||
..Flags::default()
|
||||
}
|
||||
|
@ -5754,7 +5750,6 @@ mod tests {
|
|||
canary: false,
|
||||
version: None,
|
||||
output: None,
|
||||
ca_file: Some("example.crt".to_owned()),
|
||||
}),
|
||||
ca_file: Some("example.crt".to_owned()),
|
||||
..Flags::default()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue