We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ab46c9 commit 7f6ba3cCopy full SHA for 7f6ba3c
headless_browser_lib/src/conf.rs
@@ -315,10 +315,12 @@ lazy_static::lazy_static! {
315
};
316
/// The chrome launch path.
317
pub static ref CHROME_PATH: String = {
318
+ // cargo bench will always pass in the first arg
319
let default_path = std::env::args().nth(1).unwrap_or_default();
320
+ let trimmed_path = default_path.trim();
321
322
// handle testing and default to OS
- if default_path.is_empty() || default_path.trim() == "--nocapture" {
323
+ if default_path.is_empty() || trimmed_path == "--nocapture" || trimmed_path == "--bench" {
324
let chrome_path = match std::env::var("CHROME_PATH") {
325
Ok(p) => p,
326
_ => Default::default()
0 commit comments