cli: pull documentation url from product.json (#166993)

Fixes https://github.com/microsoft/vscode-cli/issues/560
This commit is contained in:
Connor Peet
2022-11-22 11:21:41 -08:00
committed by GitHub
parent bf2973f97c
commit fb53973c5f
4 changed files with 14 additions and 8 deletions

View File

@@ -4,7 +4,9 @@
*--------------------------------------------------------------------------------------------*/
use std::fmt::Display;
use crate::constants::{APPLICATION_NAME, CONTROL_PORT, QUALITYLESS_PRODUCT_NAME};
use crate::constants::{
APPLICATION_NAME, CONTROL_PORT, DOCUMENTATION_URL, QUALITYLESS_PRODUCT_NAME,
};
// Wraps another error with additional info.
#[derive(Debug, Clone)]
@@ -169,7 +171,8 @@ impl std::fmt::Display for SetupError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(
f,
"{}\r\n\r\nMore info at https://code.visualstudio.com/docs/remote/linux",
"{}\r\n\r\nMore info at {}/remote/linux",
DOCUMENTATION_URL.unwrap_or("<docs>"),
self.0
)
}