mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 11:22:04 +00:00
fix: don't inherit stdout from parent
This commit is contained in:
parent
20b99f9281
commit
c509a8e549
5
.changes/fix-tauri-driver-stdout-pollution.md
Normal file
5
.changes/fix-tauri-driver-stdout-pollution.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-driver': 'patch:bug'
|
||||
---
|
||||
|
||||
Prevent native WebDriver stdout from polluting tauri-driver's stdout used by test frameworks.
|
||||
@ -1,9 +1,12 @@
|
||||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
||||
// Copyright 2019-2026 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use crate::cli::Args;
|
||||
use std::{env::current_dir, process::Command};
|
||||
use std::{
|
||||
env::current_dir,
|
||||
process::{Command, Stdio},
|
||||
};
|
||||
|
||||
// the name of the binary to find in $PATH
|
||||
#[cfg(target_os = "linux")]
|
||||
@ -48,5 +51,11 @@ pub fn native(args: &Args) -> Command {
|
||||
cmd.env("TAURI_WEBVIEW_AUTOMATION", "true"); // 2.x
|
||||
cmd.arg(format!("--port={}", args.native_port));
|
||||
cmd.arg(format!("--host={}", args.native_host));
|
||||
|
||||
// Don't inherit stdout from parent to prevent native WebDriver binary/HTTP protocol data
|
||||
// from corrupting tauri-driver's stdout (which gets captured by the test framework).
|
||||
// Keep stderr inherited so WebDriver logs/errors are still visible.
|
||||
cmd.stdout(Stdio::null());
|
||||
|
||||
cmd
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user