summaryrefslogtreecommitdiffstats
path: root/crates/core/tedge_mapper/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/core/tedge_mapper/src/main.rs')
-rw-r--r--crates/core/tedge_mapper/src/main.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/core/tedge_mapper/src/main.rs b/crates/core/tedge_mapper/src/main.rs
index 4b4a9f47..eabc82a7 100644
--- a/crates/core/tedge_mapper/src/main.rs
+++ b/crates/core/tedge_mapper/src/main.rs
@@ -84,10 +84,9 @@ async fn main() -> anyhow::Result<()> {
tedge_config::TEdgeConfigLocation::from_custom_root(&mapper_opt.config_dir);
let config = tedge_config::TEdgeConfigRepository::new(tedge_config_location.clone()).load()?;
// Run only one instance of a mapper
- let _flock = check_another_instance_is_not_running(
- &mapper_opt.name.to_string(),
- &config.query(RunPathSetting)?.into(),
- )?;
+
+ let run_dir: PathBuf = config.query(RunPathSetting)?.into();
+ let _flock = check_another_instance_is_not_running(&mapper_opt.name.to_string(), &run_dir)?;
if mapper_opt.init {
component.init(&mapper_opt.config_dir).await