playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[BUG] Show `yarn` instead of `npx` in show-trace error message

Open guido-visser opened this issue 1 year ago • 1 comments

System info

  • Playwright Version: [v1.41.1]
  • Operating System: [Windows 11]
  • Browser: [Chromium]
  • Other info:

Steps

  • Run a test in a yarn environment

Expected

The log message on test fail should be: yarn playwright show-trace "test-results\page-01 - appointments-Create-chromium\trace.zip"

Maybe a solution would be that when a yarn.lock file is found, it shows yarn instead of npx.

Actual

It prints: npx playwright show-trace "test-results\page-01 - appointments-Create-chromium\trace.zip"

guido-visser avatar Jan 31 '24 13:01 guido-visser

Looking at the lock file looks like too much hassle, also won't work without the lock file. If yarn allows detecting it explicitly, we can follow up with a fix. For now marking it as non-actionable.

pavelfeldman avatar Jan 31 '24 18:01 pavelfeldman

Thanks for looking at this. At this moment, I don't know a way to explicitly know when yarn or npm is used without looking at the lockfile unfortunately.

guido-visser avatar Feb 01 '24 15:02 guido-visser

Same here, that's why we can't act on the issue. Closing as non-actionable.

pavelfeldman avatar Feb 01 '24 17:02 pavelfeldman