From b58abb171f0572b817b0bfebbe2693d1558b11a7 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 15 Jul 2024 12:08:37 -0600 Subject: [PATCH] linux: Hide Install CLI from welcome (#14506) Release Notes: - linux: Remove "Install CLI" from welcome, it is not necessary --- crates/welcome/src/welcome.rs | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/crates/welcome/src/welcome.rs b/crates/welcome/src/welcome.rs index ab313c5eead8b53f4c42d62ef7b512f1d4a1a470..49264809db409dd3f1d3557dc39915ccc8966d43 100644 --- a/crates/welcome/src/welcome.rs +++ b/crates/welcome/src/welcome.rs @@ -123,20 +123,22 @@ impl Render for WelcomePage { .ok(); })), ) - .child( - Button::new("install-cli", "Install the CLI") - .full_width() - .on_click(cx.listener(|this, _, cx| { - this.telemetry.report_app_event( - "welcome page: install cli".to_string(), - ); - cx.app_mut() - .spawn(|cx| async move { - install_cli::install_cli(&cx).await - }) - .detach_and_log_err(cx); - })), - ) + .when(cfg!(target_os = "macos"), |el| { + el.child( + Button::new("install-cli", "Install the CLI") + .full_width() + .on_click(cx.listener(|this, _, cx| { + this.telemetry.report_app_event( + "welcome page: install cli".to_string(), + ); + cx.app_mut() + .spawn(|cx| async move { + install_cli::install_cli(&cx).await + }) + .detach_and_log_err(cx); + })), + ) + }) .child( Button::new("sign-in-to-copilot", "Sign in to GitHub Copilot") .full_width()