Skip to content

Commit

Permalink
Fix htmlpty (#113)
Browse files Browse the repository at this point in the history
* Fix htmlpty

* Install the local htmlpty
  • Loading branch information
saethlin authored Jun 7, 2024
1 parent 6ab9856 commit 5ec9ffd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
echo "::group::Install dependencies"
set -o pipefail
cargo install htmlpty --locked --git https:/saethlin/miri-tools
cargo install htmlpty --locked --path htmlpty
set +e
echo "::endgroup"
htmlpty bash ci.sh ${{ matrix.suite }} 2> output.html
Expand Down
7 changes: 3 additions & 4 deletions htmlpty/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ fn main() {

let mut buf = [0u8; 4096];
let mut stdout = stdout().lock();
let mut renderer = ansi_to_html::Handle::new();
let stderr = stderr().lock();
let mut renderer = ansi_to_html::Handle::new(stderr);
while let Ok(n) = pty.read(&mut buf) {
let bytes = &buf[..n];
stdout.write_all(bytes).unwrap();
renderer.write_all(bytes).unwrap();
}

stdout.flush().unwrap();
let mut stderr = stderr().lock();
renderer.finish(&mut stderr).unwrap();
stderr.flush().unwrap();
renderer.finish().unwrap();

// Exit according to our child's status
// SAFETY: No preconditions
Expand Down

0 comments on commit 5ec9ffd

Please sign in to comment.