Skip to content

Commit

Permalink
feat: improve BinaryNotFound error with a hint
Browse files Browse the repository at this point in the history
Signed-off-by: Malo Polese <[email protected]>
  • Loading branch information
MaloPolese authored and alexandrebrg committed May 11, 2023
1 parent 115126a commit 581c727
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion firepilot/src/builder/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl FirecrackerExecutorBuilder {
.or_else(Self::find_binary_from_path)
.or_else(Self::find_binary_from_current_directory)
.map(|p| Ok(p))
.unwrap_or(Err(BuilderError::BinaryNotFound))
.unwrap_or(Err(BuilderError::BinaryNotFound("Check if FIRECRACKER_LOCATION environment variable is correctly set. For more information check https://docs.rs/firepilot/ ".to_string())))
}

/// Create a new firecracker executor, it will try to determine the binary location, but you can
Expand Down
2 changes: 1 addition & 1 deletion firepilot/src/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub enum BuilderError {
/// The field is required but was not provided in the builder object
MissingRequiredField(String),
/// Happens when using auto methods to detect firecracker /jailer binary
BinaryNotFound,
BinaryNotFound(String),
}

/// Generic trait which all builder componenet must implement in order to be
Expand Down

0 comments on commit 581c727

Please sign in to comment.