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:
David Sherret 2022-12-12 21:30:44 -05:00 committed by GitHub
parent 8c026dab92
commit 8972ebc9cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 42 additions and 49 deletions

View file

@ -45,7 +45,10 @@ To grant permissions, set them before the script argument. For example:
// Run a background task that checks for available upgrades. If an earlier
// run of this background task found a new version of Deno.
super::upgrade::check_for_upgrades(ps.dir.upgrade_check_file_path());
super::upgrade::check_for_upgrades(
ps.http_client.clone(),
ps.dir.upgrade_check_file_path(),
);
let main_module = if NpmPackageReference::from_str(&run_flags.script).is_ok()
{