Skip to content

Commit

Permalink
fix: restore the id parameter default
Browse files Browse the repository at this point in the history
  • Loading branch information
pb8o committed Oct 9, 2023
1 parent fa4b299 commit 9650b95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/firecracker/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ fn main_exec() -> Result<(), MainError> {
.arg(
Argument::new("id")
.takes_value(true)
.default_value(vmm::logger::DEFAULT_INSTANCE_ID)

Check warning on line 147 in src/firecracker/src/main.rs

View check run for this annotation

Codecov / codecov/patch

src/firecracker/src/main.rs#L147

Added line #L147 was not covered by tests
.help("MicroVM unique identifier."),
)
.arg(
Expand Down Expand Up @@ -262,8 +263,6 @@ fn main_exec() -> Result<(), MainError> {
return Ok(());
}

info!("Running Firecracker v{FIRECRACKER_VERSION}");

register_signal_handlers().map_err(MainError::RegisterSignalHandlers)?;

#[cfg(target_arch = "aarch64")]
Expand Down Expand Up @@ -301,8 +300,9 @@ fn main_exec() -> Result<(), MainError> {
let id = arguments
.single_value("id")
.map(|s| s.as_str())
.unwrap_or(vmm::logger::DEFAULT_INSTANCE_ID);
.unwrap();

Check warning on line 303 in src/firecracker/src/main.rs

View check run for this annotation

Codecov / codecov/patch

src/firecracker/src/main.rs#L303

Added line #L303 was not covered by tests
vmm::logger::INSTANCE_ID.set(String::from(id)).unwrap();
info!("Running Firecracker v{FIRECRACKER_VERSION}");

Check warning on line 305 in src/firecracker/src/main.rs

View check run for this annotation

Codecov / codecov/patch

src/firecracker/src/main.rs#L305

Added line #L305 was not covered by tests

// Apply the logger configuration.
let log_path = arguments.single_value("log-path").map(PathBuf::from);
Expand Down

0 comments on commit 9650b95

Please sign in to comment.