From e703e98f8b33bb162a8c8d5923859f58e3795095 Mon Sep 17 00:00:00 2001 From: marshmallow Date: Sun, 31 May 2026 14:52:38 +1000 Subject: [PATCH] hold clobber guard when printing built paths --- CHANGELOG.md | 1 + crates/core/src/hive/steps/build.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d9ea3f..1bb94c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Use `AssertPathExists` instead of conditional path existence checks for key services. +- Built paths printed to stdout being clobbered with the status bar. ## [v1.3.0] - 2026-05-02 diff --git a/crates/core/src/hive/steps/build.rs b/crates/core/src/hive/steps/build.rs index 91b7294..503c9c7 100644 --- a/crates/core/src/hive/steps/build.rs +++ b/crates/core/src/hive/steps/build.rs @@ -7,13 +7,10 @@ use tracing::{debug, info, instrument}; use wire_nix_client::{DerivedPath, DerivedPathOutput, NixClient, NixDaemonClientError}; use crate::{ - HiveLibError, SafeStorePath, - commands::{ + HiveLibError, SafeStorePath, acquire_stdin_lock, commands::{ CommandArguments, Either, WireCommandChip, builder::CommandStringBuilder, run_command_with_env, trace_nix_log_message, - }, - hive::node::{Context, ExecuteStep, SharedTarget}, - open_remote_client, + }, hive::node::{Context, ExecuteStep, SharedTarget}, open_remote_client }; const SYSTEM_OUTPUT: &str = "out"; @@ -101,7 +98,9 @@ impl ExecuteStep for Build { info!("Built output: {output_path:?}"); // print built path to stdout + let clobber_guard = acquire_stdin_lock().await; println!("{}", output_path.to_absolute_path()); + drop(clobber_guard); ctx.state.build = Some(output_path); } else { @@ -139,8 +138,9 @@ impl ExecuteStep for Build { info!("Built output: {stdout:?}"); - // print built path to stdout + let clobber_guard = acquire_stdin_lock().await; println!("{stdout}"); + drop(clobber_guard); ctx.state.build = Some(SafeStorePath::::from_absolute_path( stdout.as_bytes(), -- 2.51.2