summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Knaack <davidkna@users.noreply.github.com>2022-01-14 13:22:36 +0100
committerGitHub <noreply@github.com>2022-01-14 15:22:36 +0300
commit673a1981764e963667af2838134698fab3aece78 (patch)
treeff43607241a8bde075fd3af61f1f963e0f11201f
parent315aa421ee1840bfbecd10133ed9e2174ece4940 (diff)
fix(bug-report): remove git.io link shortening (#3425)
-rw-r--r--.github/workflows/deploy.yml2
-rw-r--r--Cargo.lock190
-rw-r--r--Cargo.toml8
-rw-r--r--src/bug_report.rs21
4 files changed, 6 insertions, 215 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 19feeeed4..ce59a537f 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -83,7 +83,7 @@ jobs:
uses: actions-rs/cargo@v1.0.3
with:
command: build
- args: --release --locked --features tls-vendored --target ${{ matrix.target }}
+ args: --release --locked --target ${{ matrix.target }}
use-cross: ${{ matrix.os == 'ubuntu-latest' }}
- name: Post Build | Prepare artifacts [Windows]
diff --git a/Cargo.lock b/Cargo.lock
index 347d9cb61..80ecf250d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -58,22 +58,6 @@ dependencies = [
]
[[package]]
-name = "attohttpc"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e69e13a99a7e6e070bb114f7ff381e58c7ccc188630121fc4c2fe4bcf24cd072"
-dependencies = [
- "http",
- "log",
- "native-tls",
- "openssl",
- "serde",
- "serde_urlencoded",
- "url",
- "wildmatch",
-]
-
-[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -287,17 +271,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
dependencies = [
- "core-foundation-sys 0.7.0",
- "libc",
-]
-
-[[package]]
-name = "core-foundation"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62"
-dependencies = [
- "core-foundation-sys 0.8.2",
+ "core-foundation-sys",
"libc",
]
@@ -308,12 +282,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
[[package]]
-name = "core-foundation-sys"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b"
-
-[[package]]
name = "cpufeatures"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -511,27 +479,6 @@ dependencies = [
]
[[package]]
-name = "fnv"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
-
-[[package]]
-name = "foreign-types"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
-dependencies = [
- "foreign-types-shared",
-]
-
-[[package]]
-name = "foreign-types-shared"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
-
-[[package]]
name = "form_urlencoded"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -754,17 +701,6 @@ dependencies = [
]
[[package]]
-name = "http"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11"
-dependencies = [
- "bytes",
- "fnv",
- "itoa 0.4.8",
-]
-
-[[package]]
name = "idna"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -812,12 +748,6 @@ dependencies = [
[[package]]
name = "itoa"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
-
-[[package]]
-name = "itoa"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
@@ -988,24 +918,6 @@ dependencies = [
]
[[package]]
-name = "native-tls"
-version = "0.2.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d"
-dependencies = [
- "lazy_static",
- "libc",
- "log",
- "openssl",
- "openssl-probe",
- "openssl-sys",
- "schannel",
- "security-framework",
- "security-framework-sys",
- "tempfile",
-]
-
-[[package]]
name = "nb-connect"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1153,49 +1065,6 @@ dependencies = [
]
[[package]]
-name = "openssl"
-version = "0.10.36"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a"
-dependencies = [
- "bitflags",
- "cfg-if 1.0.0",
- "foreign-types",
- "libc",
- "once_cell",
- "openssl-sys",
-]
-
-[[package]]
-name = "openssl-probe"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
-
-[[package]]
-name = "openssl-src"
-version = "111.16.0+1.1.1l"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ab2173f69416cf3ec12debb5823d244127d23a9b127d5a5189aa97c5fa2859f"
-dependencies = [
- "cc",
-]
-
-[[package]]
-name = "openssl-sys"
-version = "0.9.66"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82"
-dependencies = [
- "autocfg",
- "cc",
- "libc",
- "openssl-src",
- "pkg-config",
- "vcpkg",
-]
-
-[[package]]
name = "ordered-multimap"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1608,16 +1477,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]]
-name = "schannel"
-version = "0.1.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
-dependencies = [
- "lazy_static",
- "winapi",
-]
-
-[[package]]
name = "scoped-tls"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1630,29 +1489,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
-name = "security-framework"
-version = "2.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467"
-dependencies = [
- "bitflags",
- "core-foundation 0.9.1",
- "core-foundation-sys 0.8.2",
- "libc",
- "security-framework-sys",
-]
-
-[[package]]
-name = "security-framework-sys"
-version = "2.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e"
-dependencies = [
- "core-foundation-sys 0.8.2",
- "libc",
-]
-
-[[package]]
name = "semver"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1684,7 +1520,7 @@ version = "1.0.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142"
dependencies = [
- "itoa 1.0.1",
+ "itoa",
"ryu",
"serde",
]
@@ -1701,18 +1537,6 @@ dependencies = [
]
[[package]]
-name = "serde_urlencoded"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9"
-dependencies = [
- "form_urlencoded",
- "itoa 0.4.8",
- "ryu",
- "serde",
-]
-
-[[package]]
name = "sha-1"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1773,7 +1597,6 @@ name = "starship"
version = "1.1.1"
dependencies = [
"ansi_term",
- "attohttpc",
"byte-unit",
"chrono",
"clap",
@@ -1784,7 +1607,6 @@ dependencies = [
"indexmap",
"log",
"mockall",
- "native-tls",
"nix 0.23.1",
"notify-rust",
"once_cell",
@@ -1829,7 +1651,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3336198ad004af4447ae69be4f4e562c26814570f8f0c1e37858405a294e015d"
dependencies = [
"cfg-if 1.0.0",
- "core-foundation 0.7.0",
+ "core-foundation",
"lazycell",
"libc",
"mach",
@@ -2173,12 +1995,6 @@ dependencies = [
]
[[package]]
-name = "wildmatch"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6c48bd20df7e4ced539c12f570f937c6b4884928a87fee70a479d72f031d4e0"
-
-[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 94f9aa212..4c96d3580 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,11 +23,8 @@ is-it-maintained-open-issues = { repository = "starship/starship" }
maintenance = { status = "actively-developed" }
[features]
-default = ["battery", "http"]
-http = ["attohttpc"]
+default = ["battery"]
battery = ["starship-battery"]
-# Vendor OpenSSL, use this if you have trouble cross-compiling starship
-tls-vendored = ["native-tls/vendored"]
[dependencies]
clap = { version = "3.0.7", features = ["derive", "cargo", "unicode"] }
@@ -75,9 +72,6 @@ toml_edit = "0.13.0"
process_control = { version = "3.2.0", features = ["crossbeam-channel"] }
-# Optional/http:
-attohttpc = { version = "0.18.0", optional = true, default-features = false, features = ["tls", "form"] }
-native-tls = { version = "0.2.8", optional = true }
shell-words = "1.0.0"
[target.'cfg(windows)'.dependencies]
diff --git a/src/bug_report.rs b/src/bug_report.rs
index c70f9a778..043b7cfc8 100644
--- a/src/bug_report.rs
+++ b/src/bug_report.rs
@@ -6,9 +6,6 @@ use std::fs;
use std::path::PathBuf;
use std::time::Duration;
-#[cfg(feature = "http")]
-const GIT_IO_BASE_URL: &str = "https://git.io/";
-
pub fn create() {
println!("{}\n", shadow::version().trim());
let os_info = os_info::get();
@@ -22,7 +19,6 @@ pub fn create() {
};
let link = make_github_issue_link(environment);
- let short_link = shorten_link(&link);
if open::that(&link).is_ok() {
println!("Take a look at your browser. A GitHub issue has been populated with your configuration.");
@@ -31,22 +27,7 @@ pub fn create() {
println!("Click this link to create a GitHub issue populated with your configuration:\n");
}
- println!(" {}", short_link.unwrap_or(link));
-}
-
-#[cfg(feature = "http")]
-fn shorten_link(link: &str) -> Option<String> {
- attohttpc::post(&format!("{}{}", GIT_IO_BASE_URL, "create"))
- .form(&[("url", link)])
- .ok()
- .and_then(|r| r.send().ok())
- .and_then(|r| r.text().ok())
- .map(|slug| format!("{}{}", GIT_IO_BASE_URL, slug))
-}
-
-#[cfg(not(feature = "http"))]
-fn shorten_link(_url: &str) -> Option<String> {
- None
+ println!("{}", link);
}
const UNKNOWN_SHELL: &str = "<unknown shell>";