git.delta.rocks / jrsonnet / refs/commits / aeb19ed23fd5

difftreelog

fix nix log

Yaroslav Bolyukin2022-08-28parent: #44d807a.patch.diff
in: trunk

1 file changed

modifiedcmds/fleet/src/command.rsdiffbeforeafterboth
132 info!(target: "nix", "{}", raw_msg.unwrap_or(msg))132 info!(target: "nix", "{}", raw_msg.unwrap_or(msg))
133 }133 }
134 },134 },
135 NixLog::Start { ref fields, typ, .. } if typ == 105 && fields.len() >= 1 => {135 NixLog::Start { ref fields, typ, .. } if typ == 105 && !fields.is_empty() => {
136 if let [LogField::String(drv), ..] = &fields[..] {136 if let [LogField::String(drv), ..] = &fields[..] {
137 info!(target: "nix","building {}", drv)137 info!(target: "nix","building {}", drv)
138 } else {138 } else {
151 info!(target: "nix", "{}", text)151 info!(target: "nix", "{}", text)
152 }152 }
153 },153 },
154 NixLog::Start { text, level: 0, typ: 108, .. } if text == "" => {154 NixLog::Start { text, level: 0, typ: 108, .. } if text.is_empty() => {
155 // Cache lookup? Coupled with copy log155 // Cache lookup? Coupled with copy log
156 },156 },
157 NixLog::Start { text, level: 4, typ: 109, .. } if text.starts_with("querying info about ") => {157 NixLog::Start { text, level: 4, typ: 109, .. } if text.starts_with("querying info about ") => {
197197
198 async fn run(&mut self) -> Result<()> {198 async fn run(&mut self) -> Result<()> {
199 self.inherit_stdio();199 self.inherit_stdio();
200 let out = self.output().await?;200 let out = self.spawn()?.wait_with_output().await?;
201 if !out.status.success() {201 if !out.status.success() {
202 anyhow::bail!("command ({:?}) failed with status {}", self, out.status);202 anyhow::bail!("command ({:?}) failed with status {}", self, out.status);
203 }203 }
211211
212 async fn run_string(&mut self) -> Result<String> {212 async fn run_string(&mut self) -> Result<String> {
213 self.inherit_stdio();213 self.inherit_stdio();
214 self.stdout(Stdio::piped());
214 let out = self.output().await?;215 let out = self.spawn()?.wait_with_output().await?;
215 if !out.status.success() {216 if !out.status.success() {
216 anyhow::bail!("command ({:?}) failed with status {}", self, out.status);217 anyhow::bail!("command ({:?}) failed with status {}", self, out.status);
217 }218 }