zed: Add --system-specs arg (#27285)

Adds the `--system-specs` flag to the Zed binary, so that users who wish
to report issues can retrieve their system specs, even if Zed is failing
to launch

Still TODO:
- [x] Test and do best effort GPU info detection on Linux
- [ ] Modify GitHub issue templates to tell users that the flag is
available if they are unable to launch Zed

Release Notes:

- Added the `--system-specs` flag to the Zed binary (not the cli!), to
retrieve the system specs we ask for in GitHub issues without needing to
open Zed
This commit is contained in:
Ben Kunkle 2025-03-21 21:56:25 -05:00 committed by GitHub
parent 85a761cb2b
commit c783fd072f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 108 additions and 9 deletions

View file

@ -215,6 +215,16 @@ fn main() {
session_id.clone(),
);
if args.system_specs {
let system_specs = feedback::system_specs::SystemSpecs::new_stateless(
app_version,
app_commit_sha.clone(),
*release_channel::RELEASE_CHANNEL,
);
println!("Zed System Specs (from CLI):\n{}", system_specs);
return;
}
let (open_listener, mut open_rx) = OpenListener::new();
let failed_single_instance_check = if *db::ZED_STATELESS
@ -953,6 +963,11 @@ struct Args {
#[arg(long)]
dev_server_token: Option<String>,
/// Prints system specs. Useful for submitting issues on GitHub when encountering a bug
/// that prevents Zed from starting, so you can't run `zed: copy system specs to clipboard`
#[arg(long)]
system_specs: bool,
/// Run zed in the foreground, only used on Windows, to match the behavior of the behavior on macOS.
#[arg(long)]
#[cfg(target_os = "windows")]