cli: read tunnel lock from product.json (#179800)

Fixes #179265
This commit is contained in:
Connor Peet
2023-04-12 10:52:37 -07:00
committed by GitHub
parent c53e658dc5
commit ca9404bd2f
5 changed files with 12 additions and 19 deletions

View File

@@ -36,23 +36,12 @@ pub const VSCODE_CLI_UPDATE_ENDPOINT: Option<&'static str> =
/// Windows lock name for the running tunnel service. Used by the setup script
/// to detect a tunnel process. See #179265.
pub const TUNNEL_SERVICE_LOCK_NAME: &str = concatcp!(
"code_tunnel_service_",
match VSCODE_CLI_QUALITY {
Some(n) => n,
None => "oss",
}
);
pub const TUNNEL_SERVICE_LOCK_NAME: Option<&'static str> =
option_env!("VSCODE_CLI_TUNNEL_SERVICE_MUTEX");
/// Windows lock name for the running tunnel without a service. Used by the setup
/// script to detect a tunnel process. See #179265.
pub const TUNNEL_NO_SERVICE_LOCK_NAME: &str = concatcp!(
"code_tunnel_",
match VSCODE_CLI_QUALITY {
Some(n) => n,
None => "oss",
}
);
pub const TUNNEL_CLI_LOCK_NAME: Option<&'static str> = option_env!("VSCODE_CLI_TUNNEL_CLI_MUTEX");
pub const TUNNEL_SERVICE_USER_AGENT_ENV_VAR: &str = "TUNNEL_SERVICE_USER_AGENT";