Skip to content

Commit

Permalink
Parse default edged path from environment variable (#7160)
Browse files Browse the repository at this point in the history
Cherry-pick 1f6ce52.
  • Loading branch information
damonbarry authored Dec 4, 2023
1 parent fb3d0e0 commit 1f048bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion edgelet/iotedge/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ async fn run() -> anyhow::Result<()> {
let default_mgmt_uri = option_env!("IOTEDGE_CONNECT_MANAGEMENT_URI")
.unwrap_or("unix:///var/run/iotedge/mgmt.sock");

let default_edged_path =
option_env!("PATH_TO_AZIOT_EDGED").unwrap_or("/usr/libexec/aziot/aziot-edged");

let default_diagnostics_image_name = format!(
"/azureiotedge-diagnostics:{}",
edgelet_core::version().replace('~', "-")
Expand Down Expand Up @@ -117,7 +120,7 @@ async fn run() -> anyhow::Result<()> {
.value_name("PATH_TO_AZIOT_EDGED")
.help("Sets the path of the aziot-edged binary.")
.takes_value(true)
.default_value("/usr/libexec/aziot/aziot-edged"),
.default_value(default_edged_path),
)
.arg(
Arg::with_name("iothub-hostname")
Expand Down

0 comments on commit 1f048bf

Please sign in to comment.