Skip to content

Commit 734d87b

Browse files
chore: add bug issue template (microsoft#714)
1 parent f39f058 commit 734d87b

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug Report
3+
about: Something doesn't work like it should? Tell us!
4+
title: "[BUG]"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Context:**
11+
12+
- Playwright Version: [what Playwright version do you use?]
13+
- Operating System: [e.g. Windows, Linux or Mac]
14+
- Python Version: [e.g. 3.8, 3.9]
15+
16+
<!-- CLI to auto-capture this info -->
17+
<!-- playwright envinfo -->
18+
19+
**Code Snippet**
20+
21+
Help us help you! Put down a short code snippet that illustrates your bug and
22+
that we can run and debug locally. For example:
23+
24+
```python
25+
...
26+
```
27+
28+
**Describe the bug**
29+
30+
Add any other details about the problem here.

playwright/__main__.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,24 @@
1313
# limitations under the License.
1414

1515
import os
16+
import platform
1617
import subprocess
1718
import sys
1819

1920
from playwright._impl._driver import compute_driver_executable
21+
from playwright._repo_version import version
2022

2123

2224
def main() -> None:
23-
driver_executable = compute_driver_executable()
24-
my_env = os.environ.copy()
25-
my_env["PW_CLI_TARGET_LANG"] = "python"
26-
subprocess.run([str(driver_executable), *sys.argv[1:]], env=my_env)
25+
if "envinfo" in sys.argv:
26+
print(f"- Playwright Version: {version}")
27+
print(f"- Operating System: {platform.platform()}")
28+
print(f"- Python Version: {sys.version}")
29+
else:
30+
driver_executable = compute_driver_executable()
31+
env = os.environ.copy()
32+
env["PW_CLI_TARGET_LANG"] = "python"
33+
subprocess.run([str(driver_executable), *sys.argv[1:]], env=env)
2734

2835

2936
if __name__ == "__main__":

0 commit comments

Comments
 (0)