chore: quote path only if contains whitespaces (#29079)
Otherwise we always quote as `trace.zip` matches \W.
This is a follow-up to 674988c633
Reference https://github.com/microsoft/playwright/issues/29039
This commit is contained in:
parent
d61f99034a
commit
d7958ba4ad
|
|
@ -374,7 +374,7 @@ export function formatFailure(config: FullConfig, test: TestCase, options: {inde
|
|||
}
|
||||
|
||||
function quotePathIfNeeded(path: string): string {
|
||||
if (/\W/.test(path))
|
||||
if (/\s/.test(path))
|
||||
return `"${path}"`;
|
||||
return path;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue