copilot: Fix Copilot fails to sign in (#36138)
Closes #36093 Pin copilot version to 1.354 for now until further investigation. Release Notes: - Fixes issue where Copilot failed to sign in. Co-authored-by: MrSubidubi <dev@bahn.sh>
This commit is contained in:
parent
e52f148304
commit
4a35498829
9 changed files with 52 additions and 11 deletions
|
@ -29,6 +29,15 @@ pub struct NodeBinaryOptions {
|
|||
pub use_paths: Option<(PathBuf, PathBuf)>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum VersionCheck {
|
||||
/// Check whether the installed and requested version have a mismatch
|
||||
VersionMismatch,
|
||||
/// Only check whether the currently installed version is older than the newest one
|
||||
#[default]
|
||||
OlderVersion,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct NodeRuntime(Arc<Mutex<NodeRuntimeState>>);
|
||||
|
||||
|
@ -287,6 +296,7 @@ impl NodeRuntime {
|
|||
local_executable_path: &Path,
|
||||
local_package_directory: &Path,
|
||||
latest_version: &str,
|
||||
version_check: VersionCheck,
|
||||
) -> bool {
|
||||
// In the case of the local system not having the package installed,
|
||||
// or in the instances where we fail to parse package.json data,
|
||||
|
@ -311,7 +321,10 @@ impl NodeRuntime {
|
|||
return true;
|
||||
};
|
||||
|
||||
installed_version < latest_version
|
||||
match version_check {
|
||||
VersionCheck::VersionMismatch => installed_version != latest_version,
|
||||
VersionCheck::OlderVersion => installed_version < latest_version,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue