mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-24 21:57:41 +00:00
fix(bug-report): verify exit code of open, always print url (#1839)
* fix(bug-report): verify exit code of browser open * always print url to open ticket
This commit is contained in:
parent
c6d25a6a38
commit
ffac28745b
@ -19,16 +19,19 @@ pub fn create() {
|
||||
};
|
||||
|
||||
let link = make_github_issue_link(crate_version!(), environment);
|
||||
let short_link = shorten_link(&link);
|
||||
|
||||
if open::that(&link).is_ok() {
|
||||
print!("Take a look at your browser. A GitHub issue has been populated with your configuration")
|
||||
if open::that(&link)
|
||||
.map(|status| status.success())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
println!("Take a look at your browser. A GitHub issue has been populated with your configuration.");
|
||||
println!("If your browser has failed to open, please click this link:\n");
|
||||
} else {
|
||||
let link = shorten_link(&link).unwrap_or(link);
|
||||
println!(
|
||||
"Click this link to create a GitHub issue populated with your configuration:\n\n {}",
|
||||
link
|
||||
);
|
||||
println!("Click this link to create a GitHub issue populated with your configuration:\n");
|
||||
}
|
||||
|
||||
println!(" {}", short_link.unwrap_or(link));
|
||||
}
|
||||
|
||||
#[cfg(feature = "http")]
|
||||
|
Loading…
Reference in New Issue
Block a user