Skip to content

Commit 162a2ac

Browse files
committed
[rust] Run recording command with log
1 parent 3099a7d commit 162a2ac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/bazel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,5 @@ jobs:
206206
uses: actions/upload-artifact@v4
207207
with:
208208
name: recordings-macos
209-
path: /home/runner/.cache/selenium/recordings/*.avi
209+
path: /Users/runner/.cache/selenium/recordings/*.avi
210210
retention-days: 6

rust/src/ffmpeg.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use crate::files::{
2323
};
2424
use crate::lock::Lock;
2525
use crate::logger::Logger;
26-
use crate::shell::{run_shell_command_by_os, Command};
27-
use crate::{format_one_arg, format_three_args, format_two_args};
26+
use crate::shell::Command;
27+
use crate::{format_one_arg, format_three_args, format_two_args, run_shell_command_with_log};
2828
use anyhow::Error;
2929
use reqwest::Client;
3030
use std::fs;
@@ -42,7 +42,7 @@ const FFMPEG_RECORD_FRAME_RATE: &str = "30";
4242
const FFMPEG_RECORD_DESKTOP_WINDOWS_COMMAND: &str = "{} -f gdigrab -i desktop -r {} -q:v 1 -y {}";
4343
const FFMPEG_RECORD_DESKTOP_LINUX_COMMAND: &str =
4444
"{} -f x11grab -i $DISPLAY -r {} -vcodec huffyuv -y {}";
45-
const FFMPEG_RECORD_DESKTOP_MACOS_COMMAND: &str = "{} -f avfoundation -i \"1\" -r {} -y {}";
45+
const FFMPEG_RECORD_DESKTOP_MACOS_COMMAND: &str = "{} -f avfoundation -i $DISPLAY -r {} -y {}";
4646
const FFMPEG_RECORDING_EXTENSION: &str = "avi";
4747
const FFMPEG_RECORDING_FOLDER: &str = "recordings";
4848

@@ -213,6 +213,6 @@ pub fn record_desktop_with_ffmpeg(
213213
FFMPEG_RECORD_FRAME_RATE,
214214
&recording_name,
215215
));
216-
run_shell_command_by_os(os, command).unwrap();
216+
run_shell_command_with_log(log, os, command).unwrap();
217217
Ok(())
218218
}

0 commit comments

Comments
 (0)