diff --git a/Cargo.lock b/Cargo.lock index a1418f34c..668a07cdc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1249,7 +1249,7 @@ dependencies = [ [[package]] name = "humility" -version = "0.11.9" +version = "0.11.10" dependencies = [ "anyhow", "bitfield", diff --git a/Cargo.toml b/Cargo.toml index 8ed0b19b4..0e0cf2091 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ name = "humility" # # Be sure to check in and push all of the files that change. Happy versioning! # -version = "0.11.9" +version = "0.11.10" authors = ["Bryan Cantrill "] edition = "2018" license = "MPL-2.0" diff --git a/cmd/rebootleby/src/lib.rs b/cmd/rebootleby/src/lib.rs index 70626ab40..ab2c4f0f2 100644 --- a/cmd/rebootleby/src/lib.rs +++ b/cmd/rebootleby/src/lib.rs @@ -42,14 +42,22 @@ fn rebootleby(context: &mut ExecutionContext) -> Result<()> { let mut zip = ZipArchive::new(bundle_reader).context("opening bundle file as ZIP")?; - let img_bootleby = { - let mut entry = zip - .by_name("bootleby.bin") - .context("can't find bootleby.bin in bundle")?; - let mut data = vec![]; - entry.read_to_end(&mut data).context("reading bootleby.bin")?; - data - }; + let img_bootleby = + if zip.file_names().find(|&x| x == "bootleby.bin").is_some() { + let mut entry = zip + .by_name("bootleby.bin") + .context("can't find bootleby.bin in bundle")?; + let mut data = vec![]; + entry.read_to_end(&mut data).context("reading bootleby.bin")?; + data + } else { + let mut entry = zip.by_name("img/final.bin").context( + "can't find bootleby.bin or img/final.bin in bundle", + )?; + let mut data = vec![]; + entry.read_to_end(&mut data).context("reading bootleby.bin")?; + data + }; let img_cmpa = { let mut entry = zip.by_name("cmpa.bin").context("can't find cmpa.bin in bundle")?; diff --git a/tests/cli_tests.rs b/tests/cli_tests.rs index 49031ad5a..d8c2bb5b9 100644 --- a/tests/cli_tests.rs +++ b/tests/cli_tests.rs @@ -76,7 +76,7 @@ fn make_tests(tests: &[Test], kind: Kind) -> Result<()> { if let Some(f) = path.file_name() { if let Some(s) = f.to_str() { - if let Some(name) = s.strip_prefix(&kind.prefix()) { + if let Some(name) = s.strip_prefix(kind.prefix()) { input.push((name.to_string(), s.to_string())); } } @@ -112,7 +112,7 @@ fn make_tests(tests: &[Test], kind: Kind) -> Result<()> { let testcmd = if let Some(arg) = test.arg { format!("{} {arg}", test.cmd) } else { - format!("{}", test.cmd) + test.cmd.to_string() }; writeln!( diff --git a/tests/cmd/chip.trycmd b/tests/cmd/chip.trycmd index 3b6c69ccd..eba6ffdd4 100644 --- a/tests/cmd/chip.trycmd +++ b/tests/cmd/chip.trycmd @@ -13,7 +13,7 @@ For more information try --help ``` $ humility --chip this-can-be-anything -V -humility 0.11.9 +humility 0.11.10 ``` @@ -28,7 +28,7 @@ For more information try --help ``` $ humility -c apx432 -V -humility 0.11.9 +humility 0.11.10 ``` diff --git a/tests/cmd/version.trycmd b/tests/cmd/version.trycmd index 73553d411..5ec37fa4c 100644 --- a/tests/cmd/version.trycmd +++ b/tests/cmd/version.trycmd @@ -2,7 +2,7 @@ Long version flag: ``` $ humility --version -humility 0.11.9 +humility 0.11.10 ``` @@ -10,6 +10,6 @@ Short version flag: ``` $ humility -V -humility 0.11.9 +humility 0.11.10 ```