cli: only connect to existing tunnel process when quality is the same (#178446)

Fixes #178089
This commit is contained in:
Connor Peet 2023-03-27 12:11:18 -07:00 committed by GitHub
parent 0474f7a359
commit b51e2f3613
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,10 @@ use std::{
use serde::{de::DeserializeOwned, Serialize};
use crate::util::errors::{wrap, AnyError, NoHomeForLauncherError, WrappedError};
use crate::{
constants::VSCODE_CLI_QUALITY,
util::errors::{wrap, AnyError, NoHomeForLauncherError, WrappedError},
};
const HOME_DIR_ALTS: [&str; 2] = ["$HOME", "~"];
@ -139,7 +142,10 @@ impl LauncherPaths {
/// Lockfile for the running tunnel
pub fn tunnel_lockfile(&self) -> PathBuf {
self.root.join("tunnel.lock")
self.root.join(format!(
"tunnel-{}.lock",
VSCODE_CLI_QUALITY.unwrap_or("oss")
))
}
/// Suggested path for tunnel service logs, when using file logs