Ver Fonte

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

Alexander Korolev há 1 mês atrás
pai
commit
4e25ee4b61
1 ficheiros alterados com 2 adições e 0 exclusões
  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() {