Log every command execution
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
use crate::error::TopgradeError;
|
use crate::error::TopgradeError;
|
||||||
use crate::utils::Check;
|
use crate::utils::Check;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use log::trace;
|
use log::{debug, trace};
|
||||||
use std::ffi::{OsStr, OsString};
|
use std::ffi::{OsStr, OsString};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::{Child, Command, ExitStatus};
|
use std::process::{Child, Command, ExitStatus};
|
||||||
@@ -121,7 +121,10 @@ impl Executor {
|
|||||||
/// See `std::process::Command::spawn`
|
/// See `std::process::Command::spawn`
|
||||||
pub fn spawn(&mut self) -> Result<ExecutorChild> {
|
pub fn spawn(&mut self) -> Result<ExecutorChild> {
|
||||||
let result = match self {
|
let result = match self {
|
||||||
Executor::Wet(c) => c.spawn().map(ExecutorChild::Wet)?,
|
Executor::Wet(c) => {
|
||||||
|
debug!("Running {:?}", c);
|
||||||
|
c.spawn().map(ExecutorChild::Wet)?
|
||||||
|
}
|
||||||
Executor::Dry(c) => {
|
Executor::Dry(c) => {
|
||||||
c.dry_run();
|
c.dry_run();
|
||||||
ExecutorChild::Dry
|
ExecutorChild::Dry
|
||||||
|
|||||||
Reference in New Issue
Block a user