Sfoglia il codice sorgente

fix: publish --gist — silence gh api child output (was leaking 540 KB JSON to stdout)

Alexander Korolev 1 mese fa
parent
commit
4e25ee4b61
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      src/publish.rs

+ 2 - 0
src/publish.rs

@@ -181,6 +181,8 @@ pub async fn publish(
         let pushed = std::process::Command::new("gh")
             .args(["api", "-X", "POST", &format!("gists/{id}"), "--input", "-"])
             .stdin(std::process::Stdio::piped())
+            .stdout(std::process::Stdio::null())
+            .stderr(std::process::Stdio::null())
             .spawn()
             .and_then(|mut child| {
                 if let Some(mut stdin) = child.stdin.take() {