difftreelog
feat reenable indicatif, since the eaten line was fixed
in: trunk
3 files changed
cmds/fleet/Cargo.tomldiffbeforeafterboth49fleet-base = { version = "0.1.0", path = "../../crates/fleet-base" }49fleet-base = { version = "0.1.0", path = "../../crates/fleet-base" }505051[features]51[features]52default = ["indicatif"]52# Not quite stable53# Not quite stable53indicatif = [54indicatif = [54 "dep:tracing-indicatif",55 "dep:tracing-indicatif",cmds/fleet/src/main.rsdiffbeforeafterboth--- a/cmds/fleet/src/main.rs
+++ b/cmds/fleet/src/main.rs
@@ -185,10 +185,6 @@
#[tokio::main]
async fn async_main(opts: RootOpts) -> ExitCode {
if let Err(e) = main_real(opts).await {
- // If I remove this line, the next error!() line gets eaten.
- // This is a bug in indicatif, it needs to be fixed
- #[cfg(feature = "indicatif")]
- info!("fixme: this line gets eaten by tracing-indicatif on levels info+");
error!("{e:#}");
return ExitCode::FAILURE;
}
crates/fleet-base/src/opts.rsdiffbeforeafterboth--- a/crates/fleet-base/src/opts.rs
+++ b/crates/fleet-base/src/opts.rs
@@ -6,7 +6,7 @@
sync::{Arc, Mutex},
};
-use anyhow::Result;
+use anyhow::{Context, Result};
use clap::Parser;
use nix_eval::{nix_go, util::assert_warn, NixSessionPool, Value};
use nom::{
@@ -196,7 +196,8 @@
let mut fleet_data_path = directory.clone();
fleet_data_path.push("fleet.nix");
- let bytes = std::fs::read_to_string(fleet_data_path)?;
+ let bytes =
+ std::fs::read_to_string(fleet_data_path).context("reading fleet state (fleet.nix)")?;
let data: Mutex<FleetData> = nixlike::parse_str(&bytes)?;
let fleet_root = Value::binding(nix_session.clone(), "fleetConfigurations").await?;