Skip to content

Commit

Permalink
fix: object: uboot_env: Use the standard output for checking compatib…
Browse files Browse the repository at this point in the history
…ility

We cannot use the standard error output for checking the compatibility
as the application sends the help information to a standard output.

Signed-off-by: Otavio Salvador <[email protected]>
  • Loading branch information
otavio committed Oct 15, 2024
1 parent 014190b commit 7cc8229
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions updatehub/src/object/installer/uboot_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl Installer for objects::UbootEnv {
.log_error_msg("fw_setenv not found in PATH")?;
if !easy_process::run("fw_setenv --help")
.log_error_msg("fw_setenv --help failed to run")?
.stderr
.stdout
.contains("--script")
{
return Err(Error::FwSetEnvNoScriptOption);
Expand Down Expand Up @@ -88,7 +88,7 @@ mod tests {
r#"#! /bin/sh
case $1 in
"--help")
echo "--script" >&2
echo "--script"
;;
*)
echo fw_setenv $@ >> {}
Expand Down

0 comments on commit 7cc8229

Please sign in to comment.