瀏覽代碼

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

Alexander Korolev 1 月之前
父節點
當前提交
4e25ee4b61
共有 1 個文件被更改,包括 2 次插入 和 0 次删除
  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() {