Commit bb46da6
committed
fix(cli): do not pass PLAYWRIGHT_CLI_SESSION as daemon --endpoint
PLAYWRIGHT_CLI_SESSION is the env-var equivalent of -s/--session
(the session name). It is already consumed as such in startDaemon
via resolveSessionName. The leftover else-if branch additionally
re-passed it as the daemon's --endpoint= argument when mode is
'attach', which made the daemon try to connect to a socket at the
literal session-name path.
Repro:
PLAYWRIGHT_CLI_SESSION=myname playwright-cli attach --cdp=http://127.0.0.1:99999
-> Error: Daemon pid=...: connect ENOENT myname
The fallback dates back to #39650, when PLAYWRIGHT_CLI_SESSION
only meant "endpoint to attach to". After #39707 it gained its
current session-name meaning, but the obsolete fallback survived
through the --attach -> --endpoint rename (#39972) and the
mode-guard refactor (#40176).
Fixes microsoft/playwright-cli#4141 parent e32f907 commit bb46da6
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | 142 | | |
145 | 143 | | |
146 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
0 commit comments