Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(cli): log that the portal picks the source and --display/--window do not apply

EtienneLescotd77c92b3bd78
diff --git a/src/cli/CliRecordRunner.test.tsx b/src/cli/CliRecordRunner.test.tsx
index ac5e14ffc..04c0029ea 100644
--- a/src/cli/CliRecordRunner.test.tsx
+++ b/src/cli/CliRecordRunner.test.tsx
@@ -119,5 +119,9 @@ describe("CliRecordRunner", () => {
expect(window.electronAPI.getSources).not.toHaveBeenCalled();
expect(window.electronAPI.selectSource).not.toHaveBeenCalled();
expect(window.electronAPI.cliDone).not.toHaveBeenCalled();
+ expect(window.electronAPI.cliLog).toHaveBeenCalledWith(
+ "info",
+ expect.stringContaining("--window do not apply"),
+ );
});
});
diff --git a/src/cli/CliRecordRunner.tsx b/src/cli/CliRecordRunner.tsx
index 44aa53423..d585d855d 100644
--- a/src/cli/CliRecordRunner.tsx
+++ b/src/cli/CliRecordRunner.tsx
@@ -167,7 +167,12 @@ export function CliRecordRunner() {
// The native Linux helper asks the portal to choose a source. Enumerating
// Chromium sources first opens a redundant picker and can return no screens.
- if (!(await portalOwnsSourceSelection(window.electronAPI))) {
+ if (await portalOwnsSourceSelection(window.electronAPI)) {
+ window.electronAPI.cliLog(
+ "info",
+ "Recording source: chosen in the system picker (--display and --window do not apply)",
+ );
+ } else {
const source = await pickSource(request);
const selected = await window.electronAPI.selectSource(source, { persist: false });
if (!selected) {