mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
cli: Use leading dashes in channel designators (#10858)
/cc @maxbrunsfeld Release Notes: - N/A
This commit is contained in:
parent
d298df823f
commit
1be452744a
@ -55,11 +55,11 @@ struct InfoPlist {
|
|||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
// Intercept version designators
|
// Intercept version designators
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
if let Some(channel) = std::env::args().nth(1) {
|
if let Some(channel) = std::env::args().nth(1).filter(|arg| arg.starts_with("--")) {
|
||||||
// When the first argument is a name of a release channel, we're gonna spawn off a cli of that version, with trailing args passed along.
|
// When the first argument is a name of a release channel, we're gonna spawn off a cli of that version, with trailing args passed along.
|
||||||
use std::str::FromStr as _;
|
use std::str::FromStr as _;
|
||||||
|
|
||||||
if let Ok(channel) = release_channel::ReleaseChannel::from_str(&channel) {
|
if let Ok(channel) = release_channel::ReleaseChannel::from_str(&channel[2..]) {
|
||||||
return mac_os::spawn_channel_cli(channel, std::env::args().skip(2).collect());
|
return mac_os::spawn_channel_cli(channel, std::env::args().skip(2).collect());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user