fix(install): redirect git clone and cargo build output to stderr

Even with info/ok/warn fixed to stderr, raw command output
from git clone and cargo build was still leaking to stdout
through 2>&1 | tail -5.

Fix: added >&2 after tail -5 so ALL intermediate command output
goes to stderr, leaving only the final echo  on stdout.
This commit is contained in:
2026-06-13 19:05:32 +05:30
parent aec4209778
commit 05ec7d20b7
2 changed files with 4 additions and 4 deletions

View File

@@ -310,9 +310,9 @@ ensure_gyandoot_binary() {
clone_dir="$(mktemp -d 2>/dev/null || echo "/tmp/gyandoot-build-$$")" clone_dir="$(mktemp -d 2>/dev/null || echo "/tmp/gyandoot-build-$$")"
if command -v git &>/dev/null; then if command -v git &>/dev/null; then
git clone --depth=1 https://git.gyannetra.in/gnpl_admin/gyandoot-v2.git "$clone_dir" 2>&1 | tail -5 git clone --depth=1 https://git.gyannetra.in/gnpl_admin/gyandoot-v2.git "$clone_dir" 2>&1 | tail -5 >&2
cd "$clone_dir" cd "$clone_dir"
cargo build --release 2>&1 | tail -5 cargo build --release 2>&1 | tail -5 >&2
if [ -f "target/release/gyandoot" ]; then if [ -f "target/release/gyandoot" ]; then
ok "Built from source" ok "Built from source"
echo "$clone_dir/target/release/gyandoot" echo "$clone_dir/target/release/gyandoot"

View File

@@ -310,9 +310,9 @@ ensure_gyandoot_binary() {
clone_dir="$(mktemp -d 2>/dev/null || echo "/tmp/gyandoot-build-$$")" clone_dir="$(mktemp -d 2>/dev/null || echo "/tmp/gyandoot-build-$$")"
if command -v git &>/dev/null; then if command -v git &>/dev/null; then
git clone --depth=1 https://git.gyannetra.in/gnpl_admin/gyandoot-v2.git "$clone_dir" 2>&1 | tail -5 git clone --depth=1 https://git.gyannetra.in/gnpl_admin/gyandoot-v2.git "$clone_dir" 2>&1 | tail -5 >&2
cd "$clone_dir" cd "$clone_dir"
cargo build --release 2>&1 | tail -5 cargo build --release 2>&1 | tail -5 >&2
if [ -f "target/release/gyandoot" ]; then if [ -f "target/release/gyandoot" ]; then
ok "Built from source" ok "Built from source"
echo "$clone_dir/target/release/gyandoot" echo "$clone_dir/target/release/gyandoot"