Skip to content

Commit

Permalink
improvement: Add a little more debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpo-head committed Nov 20, 2021
1 parent b59c6f6 commit 0e5d13d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions distrod/distrod-exec/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ where
S1: AsRef<OsStr>,
S2: AsRef<OsStr>,
{
log::debug!("distrod-exec: exec_command");
let cred = get_real_credential().with_context(|| "Failed to get the real credential.")?;
cred.drop_privilege();

Expand All @@ -100,6 +101,7 @@ where
S1: AsRef<OsStr>,
S2: AsRef<OsStr>,
{
log::debug!("distrod-exec: exec_command_in_distro");
let inner = || -> Result<()> {
let cred = get_real_credential().with_context(|| "Failed to get the real credential.")?;

Expand Down
1 change: 1 addition & 0 deletions distrod/distrod/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ fn is_executed_as_alias() -> bool {
}

fn run_as_command_alias() -> Result<()> {
log::debug!("running as command alias");
if !is_executed_as_alias() {
bail!("Distrod is not run as an alias, but `run_as_command_alias` is called.");
}
Expand Down

0 comments on commit 0e5d13d

Please sign in to comment.