diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-12-02 16:26:25 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-12-02 16:31:02 +0200 |
commit | 57517b7e480760493d57f84e87b9a584ce135dab (patch) | |
tree | 02696c31fc2ff529e5e97038acd141549909bfcb | |
parent | c6201a0b95e2e80dfb3d79af3b68522b0fec412f (diff) | |
download | ambient-run-57517b7e480760493d57f84e87b9a584ce135dab.tar.gz |
fix: don't require an end marker in the build log
The end marker is not actually very useful, and if the build
terminates before the in-VM helper writes the end marker,
`ambient-run` is confused and unhappy. Better to not require the end
marker.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Sponsored-by: author
-rw-r--r-- | src/qemu.rs | 5 |
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()) |