summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@noreply.codeberg.org>2023-12-02 14:32:35 +0000
committerLars Wirzenius <liw@noreply.codeberg.org>2023-12-02 14:32:35 +0000
commitebbe7f15b0c71d4f0661955082cdda89abffd8a5 (patch)
tree02696c31fc2ff529e5e97038acd141549909bfcb
parentc6201a0b95e2e80dfb3d79af3b68522b0fec412f (diff)
parent57517b7e480760493d57f84e87b9a584ce135dab (diff)
downloadambient-run-ebbe7f15b0c71d4f0661955082cdda89abffd8a5.tar.gz
Merge pull request 'fix: don't require an end marker in the build log' (#30) from liw/no-log-end-marker into mainHEADmain
Reviewed-on: https://codeberg.org/ambient/ambient-run/pulls/30
-rw-r--r--src/qemu.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qemu.rs b/src/qemu.rs
index d1b0761..bdcd064 100644
--- a/src/qemu.rs
+++ b/src/qemu.rs
@@ -210,15 +210,12 @@ impl Qemu {
fn build_log(filename: &Path) -> Result<String, QemuError> {
const BEGIN: &str = "====================== BEGIN ======================";
- const END: &str = "====================== END ======================";
let log = std::fs::read(filename).map_err(|e| QemuError::ReadLog(filename.into(), e))?;
let log = String::from_utf8_lossy(&log);
if let Some((_, log)) = log.split_once(BEGIN) {
- if let Some((log, _)) = log.split_once(END) {
- return Ok(log.into());
- }
+ return Ok(log.into());
}
Ok("".into())