Skip to content

Commit

Permalink
Merge pull request #3098 from Bravo555/improve/remove-stderr-report-d…
Browse files Browse the repository at this point in the history
…uplicate

Fix process exit code and stderr printing 2 times
  • Loading branch information
Bravo555 committed Sep 3, 2024
2 parents 6bf20fa + cb9583e commit 94d43f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/extensions/tedge_config_manager/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ impl ConfigManagerWorker {
&self,
from: &Utf8Path,
config_type: &str,
) -> Result<Utf8PathBuf, ConfigManagementError> {
) -> anyhow::Result<Utf8PathBuf> {
let file_entry = self.plugin_config.get_file_entry_from_type(config_type)?;

let to = Utf8PathBuf::from(&file_entry.path);
Expand Down Expand Up @@ -421,13 +421,13 @@ impl ConfigManagerWorker {

if let Some(io_error) = err.downcast_ref::<std::io::Error>() {
if io_error.kind() != ErrorKind::PermissionDenied {
return Err(err.into());
return Err(err);
}
}

match self.config.use_tedge_write.clone() {
TedgeWriteStatus::Disabled => {
return Err(err.into());
return Err(err);
}

TedgeWriteStatus::Enabled { sudo } => {
Expand Down

0 comments on commit 94d43f2

Please sign in to comment.